aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/company.rb
diff options
context:
space:
mode:
authorKoichi ITO <koic.ito@gmail.com>2017-06-01 12:51:15 +0900
committerKoichi ITO <koic.ito@gmail.com>2017-06-01 18:22:46 +0900
commite28e37c0149834af4d620f5d2063ce3c1e4b7921 (patch)
tree498dbcaa06eddb9cb0d4d8b4ee44c9cd17b465a7 /activerecord/test/models/company.rb
parent908b136cf27aeb38b06dc98e7d2215d852ffc962 (diff)
downloadrails-e28e37c0149834af4d620f5d2063ce3c1e4b7921.tar.gz
rails-e28e37c0149834af4d620f5d2063ce3c1e4b7921.tar.bz2
rails-e28e37c0149834af4d620f5d2063ce3c1e4b7921.zip
Correct a has_many association test
Diffstat (limited to 'activerecord/test/models/company.rb')
-rw-r--r--activerecord/test/models/company.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb
index d269a95e8c..c6a5bf1c92 100644
--- a/activerecord/test/models/company.rb
+++ b/activerecord/test/models/company.rb
@@ -175,6 +175,7 @@ end
class ExclusivelyDependentFirm < Company
has_one :account, foreign_key: "firm_id", dependent: :delete
has_many :dependent_sanitized_conditional_clients_of_firm, -> { order("id").where("name = 'BigShot Inc.'") }, foreign_key: "client_of", class_name: "Client", dependent: :delete_all
+ has_many :dependent_hash_conditional_clients_of_firm, -> { order("id").where(name: "BigShot Inc.") }, foreign_key: "client_of", class_name: "Client", dependent: :delete_all
has_many :dependent_conditional_clients_of_firm, -> { order("id").where("name = ?", "BigShot Inc.") }, foreign_key: "client_of", class_name: "Client", dependent: :delete_all
end