I want to grab all the users that either have an email as the one supplied or the first and last name. So for example:
users = User.where(:first_name => \
You could use string conditions, as in Client.where("orders_count = ? AND locked = ?", params[:orders], false), and use OR in conjunction with AND. Be careful with the priority of those operators though.
Client.where("orders_count = ? AND locked = ?", params[:orders], false)
OR
AND
Cf Active Record Query Interface guide