On 29 November 2011 12:04, Somnath Mallick <[email protected]> wrote: > irb(main):003:0> user = User.new(:name => "Michael Hartl", :email => > "[email protected]") > => #<User id: nil, name: "Michael Hartl", email: "[email protected]", > created_at: nil, updated_at: nil> > > irb(main):006:0> user.save > > irb(main):012:0> user.find(1) > NoMethodError: undefined method `find' for #<User:0x1d401b0>
User.find(1) Note the case sensitivity - you were calling a method "find" on an instance of the User model, not the User class method "find". > Why doesn't this site have something like code tags or something?!!! :) This "site" is a mailing list... -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

