Now that ActiveRecord::Relation#all is deprecated in Rails 4, how are you supposed to iterate all records?
Used to be like:
Foo.all.each do |foo|
# w
Release notes for Rails 4:
Model.all now returns an ActiveRecord::Relation, rather than an array of records. Use Relation#to_a if you really want an array.
So your code will look like this:
Foo.all.to_a.each do |foo|
# whatever
end
See http://guides.rubyonrails.org/4_0_release_notes.html#active-record