From 9b52e447a6ba152337e0aa22fddb4fbb7f2d485e Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Mon, 11 Jan 2016 17:05:05 +0100 Subject: [PATCH] Improve generated config initializer files - Fix grammar. - Improve readability/understanding. - Wrap lines at 80 characters. [skip ci] --- .../active_record_belongs_to_required_by_default.rb | 5 +++-- .../app/templates/config/initializers/callback_terminator.rb | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/active_record_belongs_to_required_by_default.rb b/railties/lib/rails/generators/rails/app/templates/config/initializers/active_record_belongs_to_required_by_default.rb index 78f4530514..f613b40f80 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/initializers/active_record_belongs_to_required_by_default.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/active_record_belongs_to_required_by_default.rb @@ -1,5 +1,6 @@ # Be sure to restart your server when you modify this file. -# Require `belongs_to` associations by default. This is a new Rails 5.0 default, -# so introduced as a config to ensure apps made with earlier versions of Rails aren't affected when upgrading. +# Require `belongs_to` associations by default. This is a new Rails 5.0 +# default, so it is introduced as a configuration option to ensure that apps +# made on earlier versions of Rails are not affected when upgrading. Rails.application.config.active_record.belongs_to_required_by_default = true diff --git a/railties/lib/rails/generators/rails/app/templates/config/initializers/callback_terminator.rb b/railties/lib/rails/generators/rails/app/templates/config/initializers/callback_terminator.rb index 0b718aa1c6..649e82280e 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/initializers/callback_terminator.rb +++ b/railties/lib/rails/generators/rails/app/templates/config/initializers/callback_terminator.rb @@ -1,5 +1,6 @@ # Be sure to restart your server when you modify this file. -# Do not halt callback chains when a callback returns false. This is a new Rails 5.0 default, -# so introduced as a config to ensure apps made with earlier versions of Rails aren't affected when upgrading. +# Do not halt callback chains when a callback returns false. This is a new +# Rails 5.0 default, so it is introduced as a configuration option to ensure +# that apps made with earlier versions of Rails are not affected when upgrading. ActiveSupport.halt_callback_chains_on_return_false = false