diff options
| author | Yuji Yaginuma <yuuji.yaginuma@gmail.com> | 2018-02-13 07:13:38 +0900 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-13 07:13:38 +0900 | 
| commit | 2c4e9c678bcfae23fcee28c105577403ebb2aa00 (patch) | |
| tree | 04ebd22004f66792d6b0b090fd1c4215b406f8d5 /railties/lib/rails/application | |
| parent | c01c38efbda53b66a4a7d677af523ac8ac493321 (diff) | |
| download | rails-2c4e9c678bcfae23fcee28c105577403ebb2aa00.tar.gz rails-2c4e9c678bcfae23fcee28c105577403ebb2aa00.tar.bz2 rails-2c4e9c678bcfae23fcee28c105577403ebb2aa00.zip  | |
Do not update `load_defaults` version when running `app:update` (#31951)
Incompatible settings are included in the settings set by `load_defaults`.
So, I think that target version should be updated by a user when becomes
available, and should not be updated with `app:update`.
Diffstat (limited to 'railties/lib/rails/application')
| -rw-r--r-- | railties/lib/rails/application/configuration.rb | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 6743ab2a54..46ad3557e3 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -19,7 +19,7 @@ module Rails                      :read_encrypted_secrets, :log_level, :content_security_policy_report_only,                      :require_master_key -      attr_reader :encoding, :api_only +      attr_reader :encoding, :api_only, :loaded_config_version        def initialize(*)          super @@ -58,6 +58,7 @@ module Rails          @content_security_policy             = nil          @content_security_policy_report_only = false          @require_master_key                  = false +        @loaded_config_version               = nil        end        def load_defaults(target_version) @@ -118,6 +119,8 @@ module Rails          else            raise "Unknown version #{target_version.to_s.inspect}"          end + +        @loaded_config_version = target_version        end        def encoding=(value)  | 
