From d5580b91b64daeb114875f24f6d54bbf88428018 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Tue, 9 Sep 2014 09:44:48 +0200 Subject: Allow included modules to override association methods. Closes #16684. This is achieved by always generating `GeneratedAssociationMethods` when `ActiveRecord::Base` is subclassed. When some of the included modules of `ActiveRecord::Base` were reordered this behavior was broken as `Core#initialize_generated_modules` was no longer called. Meaning that the module was generated on first access. --- activerecord/test/cases/attribute_methods/read_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/test/cases/attribute_methods/read_test.rb') diff --git a/activerecord/test/cases/attribute_methods/read_test.rb b/activerecord/test/cases/attribute_methods/read_test.rb index 4741ee8799..e38b32d7fc 100644 --- a/activerecord/test/cases/attribute_methods/read_test.rb +++ b/activerecord/test/cases/attribute_methods/read_test.rb @@ -13,6 +13,7 @@ module ActiveRecord def self.superclass; Base; end def self.base_class; self; end def self.decorate_matching_attribute_types(*); end + def self.initialize_generated_modules; end include ActiveRecord::AttributeMethods -- cgit v1.2.3