Skip to content

Instantly share code, notes, and snippets.

@wesgarrison
Created July 5, 2010 03:10
Show Gist options
  • Save wesgarrison/463959 to your computer and use it in GitHub Desktop.
Save wesgarrison/463959 to your computer and use it in GitHub Desktop.
task :fix_updated_at => :environment do
desc 'fix updated_at dates on requests'
Request.record_timestamps = false
Request.all.each do |r|
r.update_attribute(:updated_at, r.calculated_updated_at)
end
end
@heaven
Copy link

heaven commented Sep 7, 2015

Hi, do you know about a thread safe solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment