Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Delete blank lines in migration generator

  • Loading branch information...
commit 12b2f8b040aeb7a69150dff7534b82ef633be331 1 parent 70b9db1
@spastorino spastorino authored
View
5 activerecord/lib/rails/generators/active_record/model/templates/migration.rb
@@ -8,11 +8,10 @@ def change
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
Please sign in to comment.
Something went wrong with that request. Please try again.