Removes any condition from the query other than the one(s) specified in
onlies.
Post.order('id asc').only(:where)# discards the order conditionPost.order('id asc').only(:where,:order)# uses the specified order
# File activerecord/lib/active_record/relation/spawn_methods.rb, line 60
def only(*onlies)
if onlies.any? { |o| o == :where }
onlies << :bind
end
relation_with values.slice(*onlies)
end