From 8c26c0e3fc5d28c8a007361700c3a2dd44feb6fa Mon Sep 17 00:00:00 2001 From: Yuki Inoue Date: Fri, 17 Nov 2017 01:56:36 +0900 Subject: [PATCH] End with newline created config/initializers/paper_trail.rb (#1009) * End with newline created config/initializers/paper_trail.rb Currently, config/initializers/paper_trail.rb file created by rails generate paper_trail:install does not end with newline. Such text files may result in trouble because in unix text files generally should end with newline. So, make it put newline at the end. * Update CHANGELOG.md * Remove None --- CHANGELOG.md | 3 ++- lib/generators/paper_trail/install_generator.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c3ed40f..fa556a5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,8 @@ In PT 8, the following are deprecated, and will be removed in 9: ### Fixed -- None +- [#1009](https://github.com/airblade/paper_trail/pull/1009) + End generated `config/initializers/paper_trail.rb` with newline. ## 8.0.1 (2017-10-25) diff --git a/lib/generators/paper_trail/install_generator.rb b/lib/generators/paper_trail/install_generator.rb index 8f6e56fa..18a21ca0 100644 --- a/lib/generators/paper_trail/install_generator.rb +++ b/lib/generators/paper_trail/install_generator.rb @@ -43,7 +43,7 @@ module PaperTrail def create_initializer create_file( "config/initializers/paper_trail.rb", - "PaperTrail.config.track_associations = #{!!options.with_associations?}" + "PaperTrail.config.track_associations = #{!!options.with_associations?}\n" ) end