Permalink
Browse files

Merge pull request #5616 from cbartlett/migration-indent

Fix indenting in migration generator
  • Loading branch information...
2 parents da5f656 + e5156c9 commit a3e5b7bdf2996893c1d11878a6642f9d51927efa @spastorino spastorino committed Mar 28, 2012
View
4 activerecord/lib/rails/generators/active_record/migration/templates/migration.rb
@@ -13,9 +13,9 @@ def up
<% 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

0 comments on commit a3e5b7b

Please sign in to comment.