diff options
author | Arthur Neves <arthurnn@gmail.com> | 2015-10-26 22:04:02 -0400 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2015-10-26 22:04:02 -0400 |
commit | 60c9701269f5b412849f1a507df61ba4735914d7 (patch) | |
tree | 58f547526e8fd8d4c11527aeed5ccaa0cd0e624d /activerecord/test | |
parent | 6a25202d9ea3b4a7c9f2d6154b97cf8ba58403db (diff) | |
parent | 3c4aa73ce8ea3dd8deb6025bc62382c1e9c870f3 (diff) | |
download | rails-60c9701269f5b412849f1a507df61ba4735914d7.tar.gz rails-60c9701269f5b412849f1a507df61ba4735914d7.tar.bz2 rails-60c9701269f5b412849f1a507df61ba4735914d7.zip |
Merge pull request #21994 from mtodd/inherit-scopes
Fix InheritanceTest#test_scope_inherited_properly implementation bugs
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/inheritance_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/models/company.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb index f67d85603a..2d939dc3d7 100644 --- a/activerecord/test/cases/inheritance_test.rb +++ b/activerecord/test/cases/inheritance_test.rb @@ -352,8 +352,8 @@ class InheritanceTest < ActiveRecord::TestCase end def test_scope_inherited_properly - assert_nothing_raised { Company.of_first_firm } - assert_nothing_raised { Client.of_first_firm } + assert_nothing_raised { Company.of_first_firm.to_sql } + assert_nothing_raised { Client.of_first_firm.to_sql } end end diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb index 1dcd9fc21e..dd890909ab 100644 --- a/activerecord/test/models/company.rb +++ b/activerecord/test/models/company.rb @@ -12,7 +12,7 @@ class Company < AbstractCompany has_many :developers, :through => :contracts scope :of_first_firm, lambda { - joins(:account => :firm). + joins(:accounts => :firm). where('firms.id' => 1) } |