diff options
author | Marcelo Silveira <marcelo@mhfs.com.br> | 2012-03-21 19:28:34 -0300 |
---|---|---|
committer | Marcelo Silveira <marcelo@mhfs.com.br> | 2012-03-21 19:28:34 -0300 |
commit | 86d1dfb821dcc31897a0899e9b0933852d33cac3 (patch) | |
tree | 3cd81f2499602732539c53a68d9dd7aec098b75d /activerecord/lib/rails/generators | |
parent | 0a12a5f8169685915cbb7bf4d0a7bb482f7f2fd2 (diff) | |
download | rails-86d1dfb821dcc31897a0899e9b0933852d33cac3.tar.gz rails-86d1dfb821dcc31897a0899e9b0933852d33cac3.tar.bz2 rails-86d1dfb821dcc31897a0899e9b0933852d33cac3.zip |
Avoid another blank line in generated migration and remove assertion as per @spastorino request
Diffstat (limited to 'activerecord/lib/rails/generators')
-rw-r--r-- | activerecord/lib/rails/generators/active_record/migration/templates/migration.rb | 2 |
1 files changed, 1 insertions, 1 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 85f0d43b77..9ca63a209e 100644 --- a/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb +++ b/activerecord/lib/rails/generators/active_record/migration/templates/migration.rb @@ -26,7 +26,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration <%= migration_action == 'add' ? 'remove' : 'add' %>_column :<%= table_name %>, :<%= attribute.name %><% if migration_action == 'remove' %>, :<%= attribute.type %><%= attribute.inject_options %><% end %> <%- if attribute.has_index? && migration_action == 'remove' -%> add_index :<%= table_name %>, :<%= attribute.index_name %><%= attribute.inject_index_options %> - <%- end %> + <%- end -%> <%- end -%> <%- end -%> end |