Method: ActiveRecord::ConnectionAdapters::TableDefinition#to_sql

Defined in:
lib/active_record/connection_adapters/abstract/schema_definitions.rb

#to_sqlObject

Returns a String whose contents are the column definitions concatenated together. This string can then be prepended and appended to to generate the final SQL to create the table.



277
278
279
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 277

def to_sql
  @columns.map { |c| c.to_sql } * ', '
end