instance method
columns_hash
Ruby on Rails 3.2.22.5
Since v3.2.22.5Signature
columns_hash(table = nil)
Get the columns for a table as a hash, key is the column name value is the column object.
Parameters
-
tableopt = nil
Source
# File activerecord/lib/active_record/connection_adapters/schema_cache.rb, line 44
def columns_hash(table = nil)
if table
@columns_hash[table]
else
@columns_hash
end
end
Defined in activerecord/lib/active_record/connection_adapters/schema_cache.rb line 44
· View on GitHub
· Improve this page
· Find usages on GitHub