I want to find records based on more than one parameters. And those parameters are of mupltiple options.
As "SELECT something FROM mytable WHERE user_name="xyz" and status=("Active" OR "Deleted")
How do I translate this to rails statement?
Person.find_by_user_name_and_status(user_name, status) # this doesn't take the OR operator
I can’t test it right now, but did you try this?
if the above does not work, this should…
You should take a look into the Rails Guide for Active Record: http://guides.rubyonrails.org/active_record_querying.html