module ActiveRecord::SpawnMethods

def only(*onlies)

Post.order('id asc').only(:where, :order) # uses the specified order
Post.order('id asc').only(:where) # discards the order condition

Removes any condition from the query other than the one(s) specified in +onlies+.
def only(*onlies)
  relation_with values.slice(*onlies)
end