aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/nested_attributes.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/lib/active_record/nested_attributes.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/lib/active_record/nested_attributes.rb')
-rw-r--r--activerecord/lib/active_record/nested_attributes.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/nested_attributes.rb b/activerecord/lib/active_record/nested_attributes.rb
index dfad2901c5..1ea2f53fd8 100644
--- a/activerecord/lib/active_record/nested_attributes.rb
+++ b/activerecord/lib/active_record/nested_attributes.rb
@@ -1,9 +1,10 @@
module ActiveRecord
module NestedAttributes #:nodoc:
- def self.included(base)
- base.extend(ClassMethods)
- base.class_inheritable_accessor :reject_new_nested_attributes_procs, :instance_writer => false
- base.reject_new_nested_attributes_procs = {}
+ extend ActiveSupport::DependencyModule
+
+ included do
+ class_inheritable_accessor :reject_new_nested_attributes_procs, :instance_writer => false
+ self.reject_new_nested_attributes_procs = {}
end
# == Nested Attributes