aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-11-25 22:03:45 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-11-25 22:03:45 +0000
commitea713b6bb9680ef6226761dfc1501f261198723d (patch)
tree45c6d9b9af225217885eedcc154fbe191be92de0 /railties/lib/rails_generator
parent566903484c370f74e9d4797c8edd55e600739353 (diff)
downloadrails-ea713b6bb9680ef6226761dfc1501f261198723d.tar.gz
rails-ea713b6bb9680ef6226761dfc1501f261198723d.tar.bz2
rails-ea713b6bb9680ef6226761dfc1501f261198723d.zip
No trailing whitespace in migration generation (closes #10235)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator')
-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