I need to select where column = (this||that) and someothercolumn=something

<% @friended = current_user.profile.friendables.where("(from_id = ? OR 
to_id = ?) AND accepted = true)", current_user.id,  current_user.id) %>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/c2e45814-b928-41e4-a188-9cc0babeba53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to