Unable to do renaming of fields to all documents in a collection
for eg:-
Subscriber.all.rename(:home_number => :home_numbers)
OR
Subscriber.where(:home_number => '9876543210').rename(:home_number => :home_numbers)
NoMethodError: undefined method rename' for #<Array:0xc28f184> from /home/jai/cellvoice_gits/current/r2i-web/vendor/ruby/1.9.1/gems/mongoid-2.4.12/lib/mongoid/criteria.rb:385:inmethod_missing'
from (irb):45
Unable to do renaming of fields to all documents in a collection for eg:- Subscriber.all.rename(:home_number => :home_numbers) OR Subscriber.where(:home_number => '9876543210').rename(:home_number => :home_numbers) NoMethodError: undefined method
rename' for #<Array:0xc28f184> from /home/jai/cellvoice_gits/current/r2i-web/vendor/ruby/1.9.1/gems/mongoid-2.4.12/lib/mongoid/criteria.rb:385:in
method_missing' from (irb):45