Method: ActiveRecord::ConnectionAdapters::SchemaStatements#columns

Defined in:
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb

#columns(table_name) ⇒ Object

Returns an array of Column objects for the table specified by table_name.



111
112
113
114
115
116
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb', line 111

def columns(table_name)
  table_name = table_name.to_s
  column_definitions(table_name).map do |field|
    new_column_from_field(table_name, field)
  end
end