annotate_models
annotate_models copied to clipboard
Do not delete leading empty lines
Source code may have magic comments.
# frozen_string_literal: true
# == Schema Information
#
# Table name: foo
#
# id :integer not null, primary key
# created_at :datetime
# updated_at :datetime
#
class Foo < ActiveRecord::Base
end
In this case, the blank line before the annotation should not be erased by annotate --delete
.
Expected:
# frozen_string_literal: true
class Foo < ActiveRecord::Base
end
But actual:
# frozen_string_literal: true
class Foo < ActiveRecord::Base
end
This change fixes it.