mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Delete blank lines in migration generator
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user