def value=(param)
      newvalue = param.to_s
      if newvalue != self[:value]
        raise ConfigError, "#{self.key} cannot be changed" unless settable? || self[:value].blank?
        if boolean?
          self[:value] = (newvalue == "1" || newvalue == "true") ? "true" : "false"
        else
          self[:value] = newvalue
        end
        self.save!
      end
      self[:value]
    end
def value=(param)
      newvalue = param.to_s
      if newvalue != self[:value]
        raise ConfigError, "#{self.key} cannot be changed" unless settable? || self[:value].blank?
        if boolean?
          self[:value] = (newvalue == "1" || newvalue == "true") ? "true" : "false"
        else
          self[:value] = newvalue
        end
        self.save!
      end
      self[:value]
    end
The usual way to use a config item:

    Radiant.detail['key'] = value

 is equivalent to this:

   Radiant::Config.find_or_create_by(key: 'key').value = value

 Calling value= also applies any validations and restrictions that are found in the associated definition.
 so this will raise a ConfigError if you try to change a protected config entry or a RecordInvalid if you
 set a value that is not among those permitted.