aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/eager_load_nested_include_test.rb
diff options
context:
space:
mode:
authorBryan Helmkamp <bryan@brynary.com>2009-05-11 22:23:47 -0400
committerBryan Helmkamp <bryan@brynary.com>2009-05-11 22:23:47 -0400
commita2875bec9a31702a385d2f34e66843ddbe4e9db2 (patch)
tree18e221e8a08f041efd7cb751d5114cf6430272f6 /activerecord/test/cases/associations/eager_load_nested_include_test.rb
parent00a9d4b91cccdd88146cbe716eca844dcdfa08e7 (diff)
downloadrails-a2875bec9a31702a385d2f34e66843ddbe4e9db2.tar.gz
rails-a2875bec9a31702a385d2f34e66843ddbe4e9db2.tar.bz2
rails-a2875bec9a31702a385d2f34e66843ddbe4e9db2.zip
Use DependencyModule for included hooks in ActiveRecord
Diffstat (limited to 'activerecord/test/cases/associations/eager_load_nested_include_test.rb')
-rw-r--r--activerecord/test/cases/associations/eager_load_nested_include_test.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/activerecord/test/cases/associations/eager_load_nested_include_test.rb b/activerecord/test/cases/associations/eager_load_nested_include_test.rb
index 677226ec89..5f824f9c74 100644
--- a/activerecord/test/cases/associations/eager_load_nested_include_test.rb
+++ b/activerecord/test/cases/associations/eager_load_nested_include_test.rb
@@ -6,13 +6,12 @@ require 'models/category'
require 'models/categorization'
module Remembered
- def self.included(base)
- base.extend ClassMethods
- base.class_eval do
- after_create :remember
- protected
- def remember; self.class.remembered << self; end
- end
+ extend ActiveSupport::DependencyModule
+
+ included do
+ after_create :remember
+ protected
+ def remember; self.class.remembered << self; end
end
module ClassMethods