diff options
author | Claudio B <claudiob@users.noreply.github.com> | 2016-01-01 03:26:35 -0800 |
---|---|---|
committer | Claudio B <claudiob@users.noreply.github.com> | 2016-01-01 03:26:35 -0800 |
commit | f263e250fe1656339043cf51a2075b9c97abfcce (patch) | |
tree | b4cba4a16b720e4a2ca407b3eb0a77ac07317f95 /activerecord/lib | |
parent | 6d06705fba2d926aa75391364fa753132fa1ebd5 (diff) | |
parent | 56bc3e1fb3e518c091aa588e9222bc0ed6160e10 (diff) | |
download | rails-f263e250fe1656339043cf51a2075b9c97abfcce.tar.gz rails-f263e250fe1656339043cf51a2075b9c97abfcce.tar.bz2 rails-f263e250fe1656339043cf51a2075b9c97abfcce.zip |
Merge pull request #22860 from Timmehs/better-or-example
Better example for ActiveRecord::Relation#or [ci skip]
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 983bf019bc..b86cc094fc 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -649,8 +649,8 @@ module ActiveRecord # they must differ only by #where (if no #group has been defined) or #having (if a #group is # present). Neither relation may have a #limit, #offset, or #distinct set. # - # Post.where("id = 1").or(Post.where("id = 2")) - # # SELECT `posts`.* FROM `posts` WHERE (('id = 1' OR 'id = 2')) + # Post.where("id = 1").or(Post.where("author_id = 3")) + # # SELECT `posts`.* FROM `posts` WHERE (('id = 1' OR 'author_id = 3')) # def or(other) spawn.or!(other) |