diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-12-27 00:11:31 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-12-27 00:11:31 +0530 |
commit | f3741506981d8d4aafb28066f5a3a0509a4da846 (patch) | |
tree | e40919c45f5e6a0ffa8853b6eec4804c5c16df48 /activerecord/test/cases | |
parent | c6258ee313653bc54e94e0008f1c098ed68aa3f4 (diff) | |
download | rails-f3741506981d8d4aafb28066f5a3a0509a4da846.tar.gz rails-f3741506981d8d4aafb28066f5a3a0509a4da846.tar.bz2 rails-f3741506981d8d4aafb28066f5a3a0509a4da846.zip |
Ensure Model.scoped adds type conditions for STI models
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 3de07797d4..57ce0eee61 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -291,7 +291,7 @@ class FinderTest < ActiveRecord::TestCase end def test_find_with_hash_conditions_on_joined_table - firms = Firm.all :joins => :account, :conditions => {:accounts => { :credit_limit => 50 }} + firms = Firm.joins(:account).where(:accounts => { :credit_limit => 50 }) assert_equal 1, firms.size assert_equal companies(:first_firm), firms.first end |