mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #21994 from mtodd/inherit-scopes
Fix InheritanceTest#test_scope_inherited_properly implementation bugs
This commit is contained in:
commit
60c9701269
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue