Generates all the attribute related methods for columns in the database
accessors, mutators and query methods.
# File activerecord/lib/active_record/attribute_methods.rb, line 47
def define_attribute_methods # :nodoc:
# Use a mutex; we don't want two thread simultaneously trying to define
# attribute methods.
generated_attribute_methods.synchronize do
return if attribute_methods_generated?
superclass.define_attribute_methods unless self == base_class
super(column_names)
@attribute_methods_generated = true
end
end