mongoid / origin

A Ruby DSL for building MongoDB queries
http://mongoid.org/en/origin/index.html
MIT License
62 stars 29 forks source link

undefined method rename #43

Closed jmadhav closed 12 years ago

jmadhav commented 12 years ago

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

durran commented 12 years ago

You are using Mongoid 2.4.12 - that feature is not available until 3.0.0.