Permalink
Browse files

initialize generated modules on inclusion and on inheritence

  • Loading branch information...
1 parent 4b896f9 commit ec50c75e54f426a98f7b7d8ed884b1f643188a58 @tenderlove tenderlove committed Jul 3, 2013
@@ -8,7 +8,7 @@ module AttributeMethods
include ActiveModel::AttributeMethods
included do
- @attribute_methods_generated = false
+ initialize_generated_modules
include Read
include Write
include BeforeTypeCast
@@ -15,13 +15,6 @@ def self.base_class; self; end
include ActiveRecord::AttributeMethods
- def self.define_attribute_methods
- # Created in the inherited/included hook for "proper" ARs
- @attribute_methods_mutex ||= Mutex.new
-
- super
- end
-
def self.column_names
%w{ one two three }
end

0 comments on commit ec50c75

Please sign in to comment.