Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Example now uses find_each instead of find(:all).each #241

wants to merge 1 commit into from

2 participants


Changed the example code output by the runner command to use find_each instead of find(:all).each.


I think it might be better to use Product.all.each instead of find_each as this is only meant to be example code and not efficient production ready.

@mnaberez mnaberez closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 27, 2011
  1. @mnaberez
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/lib/rails/commands/runner.rb
2  railties/lib/rails/commands/runner.rb
@@ -25,7 +25,7 @@
opts.separator "-------------------------------------------------------------"
opts.separator "#!/usr/bin/env #{File.expand_path($0)} runner"
opts.separator ""
- opts.separator "Product.find(:all).each { |p| p.price *= 2 ;! }"
+ opts.separator "Product.find_each { |p| p.price *= 2 ;! }"
opts.separator "-------------------------------------------------------------"
Something went wrong with that request. Please try again.