Class: ActiveConfiguration::Setting

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/active_configuration/setting.rb

Overview

Holds the details of a Setting and is attached to any model configured for use with ActiveConfiguration.

Note: Settings are not meant to be created and updated directly. Rather, they should be managed through the #settings method available through the configured model. See ActiveRecord::Configuration.

Instance Method Summary collapse

Instance Method Details

#presence_of_valueObject



35
36
37
# File 'app/models/active_configuration/setting.rb', line 35

def presence_of_value
  errors.add :value, "can't be blank" if value.nil?
end