Skip to content

Commit 5d9406d

Browse files
committed
Update WhereExists Documentation
Remove invalid example: ```ruby User.exists?('name = ?', 'john') ``` The example raises an `ArgumentError`: "wrong number of arguments (given 2, expected 0..1)"
1 parent acafbcb commit 5d9406d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/rubocop/cop/rails/where_exists.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ module Rails
3939
# # bad
4040
# User.exists?(name: 'john')
4141
# User.exists?(['name = ?', 'john'])
42-
# User.exists?('name = ?', 'john')
4342
# user.posts.exists?(published: true)
4443
#
4544
# # good

0 commit comments

Comments
 (0)