Skip to content

Commit

Permalink
Merge pull request #25363 from kamipo/fix_or_result_sql
Browse files Browse the repository at this point in the history
Fix `or` result SQL [ci skip]
  • Loading branch information
vipulnsward committed Jun 11, 2016
2 parents 1528c8c + 97c01bc commit f45d06e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/relation/query_methods.rb
Expand Up @@ -658,7 +658,7 @@ def rewhere(conditions)
# present). Neither relation may have a #limit, #offset, or #distinct set.
#
# Post.where("id = 1").or(Post.where("author_id = 3"))
# # SELECT `posts`.* FROM `posts` WHERE (('id = 1' OR 'author_id = 3'))
# # SELECT `posts`.* FROM `posts` WHERE ((id = 1) OR (author_id = 3))
#
def or(other)
unless other.is_a? Relation
Expand Down

0 comments on commit f45d06e

Please sign in to comment.