提交 60c97012 编写于 作者: A Arthur Neves

Merge pull request #21994 from mtodd/inherit-scopes

Fix InheritanceTest#test_scope_inherited_properly implementation bugs
......@@ -352,8 +352,8 @@ def test_inheritance_without_mapping
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)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册