From ea713b6bb9680ef6226761dfc1501f261198723d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 25 Nov 2007 22:03:45 +0000 Subject: No trailing whitespace in migration generation (closes #10235) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../generators/components/migration/templates/migration.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/lib/rails_generator') 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 -- cgit v1.2.3