Keeps only the
condition(s) specified in onlies in the query, removing all
others.
Post.order('id asc').only(:where)# keeps only the where condition, removes the orderPost.order('id asc').only(:where,:order)# keeps only the where and order conditions
# File activerecord/lib/active_record/relation/spawn_methods.rb, line 67
def only(*onlies)
relation_with values.slice(*onlies)
end