1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/rails/generators
Prem Sichanugrist 0ac7b8c843 Remove an empty line from generated migration
Currently, if you run `rails g migration remove_column_from_models`,
there is an empty line before `remove_column` line because we forgot to
use `-%>` in the template:

    $ bin/rails g migration remove_title_from_posts title:string
          invoke  active_record
          create    db/migrate/20200114061235_remove_title_from_posts.rb

    $ cat db/migrate/20200114061235_remove_title_from_posts.rb
    class RemoveTitleFromPosts < ActiveRecord::Migration[6.1]
      def change

        remove_column :posts, :title, :string
      end
    end

This commit adds the missing `-` in front of `-%>` to make it removes
the empty line.
2020-01-14 15:22:45 +09:00
..
active_record Remove an empty line from generated migration 2020-01-14 15:22:45 +09:00
active_record.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00