摘要: malls = Mall.allcount = 0malls.each do |mall| count += 1 if mall.parent_ids[0] province = Province.find(mall.parent_ids[0]) if !mall.address.include?(province.name) mall.address = province.name + mall.address mall.save p mall.address p count end endend 阅读全文
posted @ 2013-10-21 18:15 wangyuyu 阅读(795) 评论(0) 推荐(0) 编辑