File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
activerecord/lib/active_record/relation Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -52,18 +52,18 @@ def merge!(other, *rest) # :nodoc:
52
52
end
53
53
end
54
54
55
- # Removes from the query the condition(s) specified in +skips+.
55
+ # Removes the condition(s) specified in +skips+ from the query .
56
56
#
57
- # Post.order('id asc').except(:order) # discards the order condition
58
- # Post.where('id > 10').order('id asc').except(:where) # discards the where condition but keeps the order
57
+ # Post.order('id asc').except(:order) # removes the order condition
58
+ # Post.where('id > 10').order('id asc').except(:where) # removes the where condition but keeps the order
59
59
def except ( *skips )
60
60
relation_with values . except ( *skips )
61
61
end
62
62
63
- # Removes any condition from the query other than the one (s) specified in +onlies+.
63
+ # Keeps only the condition (s) specified in +onlies+ in the query, removing all others .
64
64
#
65
- # Post.order('id asc').only(:where) # discards the order condition
66
- # Post.order('id asc').only(:where, :order) # uses the specified order
65
+ # Post.order('id asc').only(:where) # keeps only the where condition, removes the order
66
+ # Post.order('id asc').only(:where, :order) # keeps only the where and order conditions
67
67
def only ( *onlies )
68
68
relation_with values . slice ( *onlies )
69
69
end
You can’t perform that action at this time.
0 commit comments