diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2013-11-02 19:45:03 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2013-11-02 19:45:03 -0700 |
commit | 661637e5b64dc1c277beb927059824ce4848ebab (patch) | |
tree | 94f759ebca81e354a12933f5e64e6124aeb1153e /activerecord/test/cases/relation | |
parent | fe9773414a29317ac8fa6c0c911bb88eb2819f40 (diff) | |
download | rails-661637e5b64dc1c277beb927059824ce4848ebab.tar.gz rails-661637e5b64dc1c277beb927059824ce4848ebab.tar.bz2 rails-661637e5b64dc1c277beb927059824ce4848ebab.zip |
Delegate #rewhere to all on the class like all other relation methods
Diffstat (limited to 'activerecord/test/cases/relation')
-rw-r--r-- | activerecord/test/cases/relation/where_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/where_test.rb b/activerecord/test/cases/relation/where_test.rb index 3e460fa3d6..56e4605ccc 100644 --- a/activerecord/test/cases/relation/where_test.rb +++ b/activerecord/test/cases/relation/where_test.rb @@ -24,6 +24,10 @@ module ActiveRecord } end + def test_rewhere_on_root + assert_equal posts(:welcome), Post.rewhere(title: 'Welcome to the weblog').first + end + def test_belongs_to_shallow_where author = Author.new author.id = 1 |