diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-27 20:09:37 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-03-28 00:13:48 -0300 |
commit | 2d5b60e982cf210c36f849185382546cf16b52b9 (patch) | |
tree | 1e0a28952700d878a90a9ada94a62e6bf0c36a3a | |
parent | f8b4ef189e1aea954e400d9a49debfe930d12f75 (diff) | |
download | rails-2d5b60e982cf210c36f849185382546cf16b52b9.tar.gz rails-2d5b60e982cf210c36f849185382546cf16b52b9.tar.bz2 rails-2d5b60e982cf210c36f849185382546cf16b52b9.zip |
Merge pull request #5616 from cbartlett/migration-indent
Fix indenting in migration generator
-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 |