aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/company.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-05-03 00:53:21 -0700
committerJon Leighton <j@jonathanleighton.com>2012-05-03 00:53:21 -0700
commit3e541799e5bf1ae5a9f377d8d5dfe42ef3e69549 (patch)
treeb8954479f19d5a9ad3fdb44d4f0d0f7ce11a5d54 /activerecord/test/models/company.rb
parent36720af42995c8bac06ea7187e2c5768f89c2783 (diff)
parent5d26c8f00a11e40660be7516a13512ed522863ed (diff)
downloadrails-3e541799e5bf1ae5a9f377d8d5dfe42ef3e69549.tar.gz
rails-3e541799e5bf1ae5a9f377d8d5dfe42ef3e69549.tar.bz2
rails-3e541799e5bf1ae5a9f377d8d5dfe42ef3e69549.zip
Merge pull request #6134 from carlosantoniodasilva/ar-relation-kernel-private-methods
Fix issue with private kernel methods and collection associations
Diffstat (limited to 'activerecord/test/models/company.rb')
-rw-r--r--activerecord/test/models/company.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb
index fbdfaa2c29..7b993d5a2c 100644
--- a/activerecord/test/models/company.rb
+++ b/activerecord/test/models/company.rb
@@ -198,6 +198,11 @@ class Account < ActiveRecord::Base
@destroyed_account_ids ||= Hash.new { |h,k| h[k] = [] }
end
+ # Test private kernel method through collection proxy using has_many.
+ def self.open
+ where('firm_name = ?', '37signals')
+ end
+
before_destroy do |account|
if account.firm
Account.destroyed_account_ids[account.firm.id] << account.id