diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-02-02 16:19:52 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-02-02 16:20:03 -0200 |
commit | 12b2f8b040aeb7a69150dff7534b82ef633be331 (patch) | |
tree | 7db7689a1cbaa462ed84e3cf3f1aae1b779600b3 /activerecord/lib/rails/generators/active_record/model/templates | |
parent | 70b9db173e958944fcf61ac8514408fba9ef0c9a (diff) | |
download | rails-12b2f8b040aeb7a69150dff7534b82ef633be331.tar.gz rails-12b2f8b040aeb7a69150dff7534b82ef633be331.tar.bz2 rails-12b2f8b040aeb7a69150dff7534b82ef633be331.zip |
Delete blank lines in migration generator
Diffstat (limited to 'activerecord/lib/rails/generators/active_record/model/templates')
-rw-r--r-- | activerecord/lib/rails/generators/active_record/model/templates/migration.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/rails/generators/active_record/model/templates/migration.rb b/activerecord/lib/rails/generators/active_record/model/templates/migration.rb index e573e908a7..4f81a52fd0 100644 --- a/activerecord/lib/rails/generators/active_record/model/templates/migration.rb +++ b/activerecord/lib/rails/generators/active_record/model/templates/migration.rb @@ -8,11 +8,10 @@ class <%= migration_class_name %> < ActiveRecord::Migration t.timestamps <% end -%> end - -<% if options[:indexes] %> +<% if options[:indexes] -%> <% attributes.select {|attr| attr.reference? }.each do |attribute| -%> add_index :<%= table_name %>, :<%= attribute.name %>_id <% end -%> -<% end %> +<% end -%> end end |