I hav a model called User ( table: users ). I hav populated the table with 2 records. I then used ruby’s console to query the records manually by this statement.
User.where(:email => 'aa@aa.com')
but it is giving me the following error.
NoMethodError: undefined method `where' for #<Class:0x4d567dc>
from C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activerecord-2.
0.2/lib/active_record/base.rb:1532:in `method_missing'
from (irb):4
can someone tell me where am i going wrong?
You are using Rails 2.x right?
The new finders are only available on Rails 3