only(*onlies) public

Removes any condition from the query other than the one(s) specified in onlies.

Example:

Post.order('id asc').only(:where)         # discards the order condition
Post.order('id asc').only(:where, :order) # uses the specified order
Show source
Register or log in to add new notes.