aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorMatt Todd <chiology@gmail.com>2015-10-19 02:03:29 -0700
committerArthur Neves <arthurnn@gmail.com>2015-10-26 21:36:43 -0400
commit3c4aa73ce8ea3dd8deb6025bc62382c1e9c870f3 (patch)
tree58f547526e8fd8d4c11527aeed5ccaa0cd0e624d /activerecord/test/models
parent6a25202d9ea3b4a7c9f2d6154b97cf8ba58403db (diff)
downloadrails-3c4aa73ce8ea3dd8deb6025bc62382c1e9c870f3.tar.gz
rails-3c4aa73ce8ea3dd8deb6025bc62382c1e9c870f3.tar.bz2
rails-3c4aa73ce8ea3dd8deb6025bc62382c1e9c870f3.zip
Make inherited scope test fail
This triggers the JoinDependency work to reflect on the associations and trigger an error as follows: ActiveRecord::ConfigurationError: Association named 'account' was not found on Company; perhaps you misspelled it? Fix Company.of_first_firm joins association name Should be `Company.joins(:accounts)` not `Company.joins(:account)`. Do the same for Client.of_first_firm
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/company.rb2
1 files changed, 1 insertions, 1 deletions
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)
}