instance method
columns_hash
Ruby on Rails 3.2.22.5
Since v3.2.22.5 Last seen in v4.1.16Signature
columns_hash()
Returns a hash of column objects for the table associated with this class.
Source
# File activerecord/lib/active_record/model_schema.rb, line 237
def columns_hash
@columns_hash ||= Hash[columns.map { |c| [c.name, c] }]
end
Defined in activerecord/lib/active_record/model_schema.rb line 237
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ModelSchema::ClassMethods