Skip to content

Instantly share code, notes, and snippets.

@jparbros
Created October 24, 2011 17:39
Show Gist options
  • Save jparbros/1309602 to your computer and use it in GitHub Desktop.
Save jparbros/1309602 to your computer and use it in GitHub Desktop.
@products.each_with_index do |p, i|
p.update_attributes(:date_available => i.minutes.ago)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment