diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-02-17 11:47:37 +0530 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-02-17 11:50:29 +0530 |
commit | e254665ac0eea72bdc3997c5fda9d02300ed0717 (patch) | |
tree | 74dd3bed8124f4ab8afa25c0db5db038188c1574 /activerecord/lib/active_record/suppressor.rb | |
parent | bb4a85da1011fecf4da6fe5b7ed73d3ba9e2e7f3 (diff) | |
download | rails-e254665ac0eea72bdc3997c5fda9d02300ed0717.tar.gz rails-e254665ac0eea72bdc3997c5fda9d02300ed0717.tar.bz2 rails-e254665ac0eea72bdc3997c5fda9d02300ed0717.zip |
Show proper error message when a non-relation object is passed to 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.
Diffstat (limited to 'activerecord/lib/active_record/suppressor.rb')
0 files changed, 0 insertions, 0 deletions