mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
initialize generated modules on inclusion and on inheritence
This commit is contained in:
parent
9f76531c3a
commit
8eb7561ac6
2 changed files with 1 additions and 8 deletions
|
@ -8,7 +8,7 @@ module ActiveRecord
|
||||||
include ActiveModel::AttributeMethods
|
include ActiveModel::AttributeMethods
|
||||||
|
|
||||||
included do
|
included do
|
||||||
@attribute_methods_generated = false
|
initialize_generated_modules
|
||||||
include Read
|
include Read
|
||||||
include Write
|
include Write
|
||||||
include BeforeTypeCast
|
include BeforeTypeCast
|
||||||
|
|
|
@ -15,13 +15,6 @@ module ActiveRecord
|
||||||
|
|
||||||
include ActiveRecord::AttributeMethods
|
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
|
def self.column_names
|
||||||
%w{ one two three }
|
%w{ one two three }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue