diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2011-05-20 00:22:17 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2011-05-20 00:22:17 -0500 |
commit | 159213001ae1d13d0d3eb7947c0595328ef16945 (patch) | |
tree | a1399fe3910561e367319b3f8dbc211588e02cee | |
parent | e7d600dcdb153b9a5c9dbbe733b7dbad74a5274f (diff) | |
download | rails-159213001ae1d13d0d3eb7947c0595328ef16945.tar.gz rails-159213001ae1d13d0d3eb7947c0595328ef16945.tar.bz2 rails-159213001ae1d13d0d3eb7947c0595328ef16945.zip |
for => each in model migration template
-rw-r--r-- | activerecord/lib/rails/generators/active_record/model/templates/migration.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/rails/generators/active_record/model/templates/migration.rb b/activerecord/lib/rails/generators/active_record/model/templates/migration.rb index 4f81a52fd0..851930344a 100644 --- a/activerecord/lib/rails/generators/active_record/model/templates/migration.rb +++ b/activerecord/lib/rails/generators/active_record/model/templates/migration.rb @@ -1,7 +1,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration def change create_table :<%= table_name %> do |t| -<% for attribute in attributes -%> +<% attributes.each do |attribute| -%> t.<%= attribute.type %> :<%= attribute.name %> <% end -%> <% if options[:timestamps] %> |