Posted By

lfatr on 04/17/11


Tagged


Versions (?)

Update every record with a cleaner value


 / Published in: Rails
 

  1. @feed_entries = FeedEntry.where("location != ''")
  2. @feed_entries.each do |x|
  3. FeedEntry.update(x.id, :location => x.location[x.location.index('center')+7..x.location.index('&sensor=')-1])
  4. end

Report this snippet  

You need to login to post a comment.