diff options
Diffstat (limited to 'railties/lib/rails_generator/generators/components/model/templates/migration.rb')
-rw-r--r-- | railties/lib/rails_generator/generators/components/model/templates/migration.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/generators/components/model/templates/migration.rb b/railties/lib/rails_generator/generators/components/model/templates/migration.rb index a6954ebd85..2a305a6a9d 100644 --- a/railties/lib/rails_generator/generators/components/model/templates/migration.rb +++ b/railties/lib/rails_generator/generators/components/model/templates/migration.rb @@ -1,7 +1,9 @@ class <%= migration_name %> < ActiveRecord::Migration def self.up create_table :<%= table_name %> do |t| - # t.column :name, :string +<% for attribute in attributes -%> + t.column :<%= attribute.name %>, :<%= attribute.type %> +<% end -%> end end |