diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-27 20:09:37 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-27 20:09:37 -0700 |
commit | a3e5b7bdf2996893c1d11878a6642f9d51927efa (patch) | |
tree | 6f5d6237c782531cb3b0abcc9f7a081caf6056b5 /activerecord/lib/rails | |
parent | da5f65676e4e6f9ac38a3bd0003cf3b1308ff0ea (diff) | |
parent | e5156c9564639cb58f1bf1240add8eb16bb52b57 (diff) | |
download | rails-a3e5b7bdf2996893c1d11878a6642f9d51927efa.tar.gz rails-a3e5b7bdf2996893c1d11878a6642f9d51927efa.tar.bz2 rails-a3e5b7bdf2996893c1d11878a6642f9d51927efa.zip |
Merge pull request #5616 from cbartlett/migration-indent
Fix indenting in migration generator
Diffstat (limited to 'activerecord/lib/rails')
-rw-r--r-- | activerecord/lib/rails/generators/active_record/migration/templates/migration.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb b/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb index 9ca63a209e..b9b5ec7956 100644 --- a/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb +++ b/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb @@ -13,9 +13,9 @@ class <%= migration_class_name %> < ActiveRecord::Migration <% attributes.each do |attribute| -%> <%- if migration_action -%> <%= migration_action %>_column :<%= table_name %>, :<%= attribute.name %><% if migration_action == 'add' %>, :<%= attribute.type %><%= attribute.inject_options %><% end %> - <% if attribute.has_index? && migration_action == 'add' %> + <%- if attribute.has_index? && migration_action == 'add' -%> add_index :<%= table_name %>, :<%= attribute.index_name %><%= attribute.inject_index_options %> - <% end -%> + <%- end -%> <%- end -%> <%- end -%> end |