diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/collection_association.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/builder/collection_association.rb b/activerecord/lib/active_record/associations/builder/collection_association.rb index e53665ce82..e78d25441b 100644 --- a/activerecord/lib/active_record/associations/builder/collection_association.rb +++ b/activerecord/lib/active_record/associations/builder/collection_association.rb @@ -22,9 +22,9 @@ module ActiveRecord::Associations::Builder # :nodoc: def self.define_extensions(model, name, &block) if block_given? - extension_module_name = "#{model.name.demodulize}#{name.to_s.camelize}AssociationExtension" + extension_module_name = "#{name.to_s.camelize}AssociationExtension" extension = Module.new(&block) - model.module_parent.const_set(extension_module_name, extension) + model.const_set(extension_module_name, extension) end end |