instance method
columns
Ruby on Rails 5.2.8.1
Since v2.2.3Signature
columns(table_name)
Returns an array of Column objects for the table specified by table_name.
Parameters
-
table_namereq
Source
# 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
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb line 111
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::SchemaStatements