-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
When I am using find_by or where().first, it raises ArgumentError
Loading development environment (Rails 3.2.11) [1] pry(main)> u = User.find_by(email: 'dante@aftership.com') ArgumentError: wrong number of arguments (1 for 0) from /Users/Dante/.rvm/gems/ruby-1.9.3-p385/gems/mongoid-3.0.22/lib/mongoid/extensions/array.rb:77:in `mongoize' [2] pry(main)> u = User.where(email: 'dante@aftership.com') => #<Mongoid::Criteria selector: {"email"=>"dante@aftership.com"} options: {} class: User embedded: false> [3] pry(main)> u = User.where(email: 'dante@aftership.com').first ArgumentError: wrong number of arguments (1 for 0) from /Users/Dante/.rvm/gems/ruby-1.9.3-p385/gems/mongoid-3.0.22/lib/mongoid/extensions/array.rb:77:in `mongoize' [2] pry(main)>
I am running Mongoid 3.0.22
Thanks.