diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-06-25 13:07:17 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-06-25 15:06:32 -0300 |
commit | 3344c011da17cb59f4452101c8e65067d7d30cce (patch) | |
tree | 5bc283e0f8e3967ab81c812ab301cc0b27879c4b /activerecord/lib/rails | |
parent | 5f64bce10f2d4b7819e97586cbe3ab225e9e43e8 (diff) | |
download | rails-3344c011da17cb59f4452101c8e65067d7d30cce.tar.gz rails-3344c011da17cb59f4452101c8e65067d7d30cce.tar.bz2 rails-3344c011da17cb59f4452101c8e65067d7d30cce.zip |
Avoid a blank line before the add/remove columns
Diffstat (limited to 'activerecord/lib/rails')
-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 edc6a18d5d..8ac21c1410 100644 --- a/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb +++ b/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb @@ -1,6 +1,6 @@ class <%= migration_class_name %> < ActiveRecord::Migration def self.up -<% attributes.each do |attribute| %> +<% attributes.each do |attribute| -%> <%- if migration_action -%> <%= migration_action %>_column :<%= table_name %>, :<%= attribute.name %><% if migration_action == 'add' %>, :<%= attribute.type %><% end %> <%- end -%> @@ -8,7 +8,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration end def self.down -<% attributes.reverse.each do |attribute| %> +<% attributes.reverse.each do |attribute| -%> <%- if migration_action -%> <%= migration_action == 'add' ? 'remove' : 'add' %>_column :<%= table_name %>, :<%= attribute.name %><% if migration_action == 'remove' %>, :<%= attribute.type %><% end %> <%- end -%> |