aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/lib/rails_generator/generators/components/migration/templates/migration.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails_generator/generators/components/migration/templates/migration.rb b/railties/lib/rails_generator/generators/components/migration/templates/migration.rb
index e47f3afd49..ca35a43229 100644
--- a/railties/lib/rails_generator/generators/components/migration/templates/migration.rb
+++ b/railties/lib/rails_generator/generators/components/migration/templates/migration.rb
@@ -1,11 +1,11 @@
class <%= class_name.underscore.camelize %> < ActiveRecord::Migration
def self.up<% attributes.each do |attribute| %>
<%= migration_action %>_column :<%= table_name %>, :<%= attribute.name %><% if migration_action == 'add' %>, :<%= attribute.type %><% end -%>
- <% end %>
+ <%- end %>
end
def self.down<% attributes.reverse.each do |attribute| %>
<%= migration_action == 'add' ? 'remove' : 'add' %>_column :<%= table_name %>, :<%= attribute.name %><% if migration_action == 'remove' %>, :<%= attribute.type %><% end -%>
- <% end %>
+ <%- end %>
end
end