I have a database that has stored information of some users.
I know for example: User.find(1) will return the user with id:1
What should I call to find a user by email? I searched a lot but could not find anything.
I also tried User.find(:email => "xyz@abc.com") but it doesn’t work.
Use
Must check these two post from railscast (For rails3)
http://railscasts.com/episodes/202-active-record-queries-in-rails-3
http://railscasts.com/episodes/215-advanced-queries-in-rails-3