lib/rails-settings/base.rb in rails-settings-cached-2.9.4 vs lib/rails-settings/base.rb in rails-settings-cached-2.9.5

- old
+ new

@@ -1,16 +1,12 @@ # frozen_string_literal: true module RailsSettings - class ProtectedKeyError < RuntimeError - def initialize(key) - super("Can't use #{key} as setting key.") - end - end - class Base < ActiveRecord::Base PROTECTED_KEYS = %w[var value] self.table_name = table_name_prefix + "settings" + + after_commit :clear_cache, on: %i[create update destroy] # get the value field, YAML decoded def value # rubocop:disable Security/YAMLLoad payload = self[:value]