instance method columns_hash

Ruby on Rails 4.0.13

Since v3.2.22.5 Last seen in v4.1.16

Available in: v3.2.22.5 v4.0.13 v4.1.16

Signature

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 216
      def columns_hash
        @columns_hash ||= Hash[columns.map { |c| [c.name, c] }]
      end

Defined in activerecord/lib/active_record/model_schema.rb line 216 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::ModelSchema::ClassMethods

Type at least 2 characters to search.

↑↓ navigate · open · esc close