aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation/or_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Show proper error message when a non-relation object is passed to ↵Prathamesh Sonpatki2016-02-171-0/+6
| | | | | | | | | | | | | | AR::Relation#or - Previously it used to show error message <"undefined method `limit_value' for {:title=>\"Rails\"}:Hash"> - Now it shows following error message. >> Post.where.not(name: 'DHH').or(name: 'Tenderlove') ArgumentError: You have passed Hash object to #or. Pass an ActiveRecord::Relation object instead. - Fixes #23714.
* Improve error message for #or when it is structurally incompatibleRafael Mendonça França2016-01-131-1/+3
| | | | | | | | When you are using scopes and you chaining these scopes it is hard to know which are the values that are incompatible. This way you can read the message and know for which values you need to look for. [Herminio Torres]
* Post.all.or(anything) == Post.allSean Griffin2015-01-291-2/+2
|
* Bring the implementation of Relation#or up to speedSean Griffin2015-01-281-3/+6
|
* Added #or to ActiveRecord::RelationMatthew Draper2015-01-281-0/+81
Post.where('id = 1').or(Post.where('id = 2')) # => SELECT * FROM posts WHERE (id = 1) OR (id = 2) [Matthew Draper & Gael Muller]