Skip to content

Instantly share code, notes, and snippets.

@vijedi
Created September 5, 2011 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijedi/1195319 to your computer and use it in GitHub Desktop.
Save vijedi/1195319 to your computer and use it in GitHub Desktop.
How to do an in query in ActiveRecord
User.where("facebook_id IN (:facebook_ids)", {:facebook_ids => ids})
# You need to manually add parenthesis around the parameter, since AR does not do anything magical with the query.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment