Skip to content

Commit

Permalink
Remove blank line from generated migration
Browse files Browse the repository at this point in the history
  • Loading branch information
mhfs committed Mar 21, 2012
1 parent b49a7dd commit c63306b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -5,7 +5,7 @@ def change
add_column :<%= table_name %>, :<%= attribute.name %>, :<%= attribute.type %><%= attribute.inject_options %>
<%- if attribute.has_index? -%>
add_index :<%= table_name %>, :<%= attribute.index_name %><%= attribute.inject_index_options %>
<%- end %>
<%- end -%>
<%- end -%>
end
<%- else -%>
Expand Down
1 change: 1 addition & 0 deletions railties/test/generators/migration_generator_test.rb
Expand Up @@ -37,6 +37,7 @@ def test_add_migration_with_attributes
assert_method :change, content do |up|
assert_match(/add_column :posts, :title, :string/, up)
assert_match(/add_column :posts, :body, :text/, up)
assert_no_match(/\n\n/, up)
end
end
end
Expand Down

0 comments on commit c63306b

Please sign in to comment.