aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb22
1 files changed, 8 insertions, 14 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index f6d106f304..46c0d6206f 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -18,13 +18,13 @@ module ActiveRecord
# See #where for more details on each format.
#
# User.where.not("name = 'Jon'")
- # # SELECT * FROM users WHERE name <> 'Jon'
+ # # SELECT * FROM users WHERE NOT (name = 'Jon')
#
# User.where.not(["name = ?", "Jon"])
- # # SELECT * FROM users WHERE name <> 'Jon'
+ # # SELECT * FROM users WHERE NOT (name = 'Jon')
#
# User.where.not(name: "Jon")
- # # SELECT * FROM users WHERE name <> 'Jon'
+ # # SELECT * FROM users WHERE name != 'Jon'
#
# User.where.not(name: nil)
# # SELECT * FROM users WHERE name IS NOT NULL
@@ -415,21 +415,15 @@ module ActiveRecord
# User.joins(:posts).where({ "posts.published" => true })
# User.joins(:posts).where({ posts: { published: true } })
#
- # === no argument or :chain
+ # === no argument
#
- # If no argument or :chain is passed, #where returns a new instance of WhereChain which, when
- # chained with either #not, #like, or #not_like, returns a new relation.
+ # If no argument is passed, #where returns a new instance of WhereChain, that
+ # can be chained with #not to return a new relation that negates the where clause.
#
# User.where.not(name: "Jon")
- # # SELECT * FROM users WHERE name <> 'Jon'
+ # # SELECT * FROM users WHERE name != 'Jon'
#
- # Book.where.like(title: "Rails%")
- # # SELECT * FROM books WHERE title LIKE 'Rails%'
- #
- # Conference.where.not_like(name: "%Kaigi")
- # # SELECT * FROM conferences WHERE name NOT LIKE '%Kaigi'
- #
- # See WhereChain for more details on #not, #like, and #not_like.
+ # See WhereChain for more details on #not.
#
# === blank condition
#