diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-11-13 11:35:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 11:35:39 +0100 |
commit | d134a9aa92838fd1511eca751777fcf1fdeacd51 (patch) | |
tree | 34648be3be03e87e6bc804ff264463659bde6e32 /activesupport/lib | |
parent | 8f2490b57f488ed60fc6e0a201ccd5e66811ab51 (diff) | |
parent | 00f5aca3ef5de2637134c40e2e8b5d3c1d5b1a08 (diff) | |
download | rails-d134a9aa92838fd1511eca751777fcf1fdeacd51.tar.gz rails-d134a9aa92838fd1511eca751777fcf1fdeacd51.tar.bz2 rails-d134a9aa92838fd1511eca751777fcf1fdeacd51.zip |
Merge pull request #30893 from y-yagi/verify_credentials_format_before_saving
Verify credentials format before saving
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/encrypted_configuration.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/encrypted_configuration.rb b/activesupport/lib/active_support/encrypted_configuration.rb index b403048627..c52d3869de 100644 --- a/activesupport/lib/active_support/encrypted_configuration.rb +++ b/activesupport/lib/active_support/encrypted_configuration.rb @@ -22,6 +22,12 @@ module ActiveSupport "" end + def write(contents) + deserialize(contents) + + super + end + def config @config ||= deserialize(read).deep_symbolize_keys end @@ -36,7 +42,7 @@ module ActiveSupport end def deserialize(config) - config.present? ? YAML.load(config) : {} + config.present? ? YAML.load(config, content_path) : {} end end end |