摘要: 1 Shop.each do |shop| 2 if !shop.comments.blank? 3 n = shop.comments.length 4 for i in 0..n-1 5 for j in i+1..n-1 6 if shop.comments[i].content == shop.comments[j].content 7 shop.comments[j].destroy 8 end 9 end10 end11 end... 阅读全文
posted @ 2013-12-23 17:21 wangyuyu 阅读(191) 评论(0) 推荐(0) 编辑