Module: PandaPal::OrganizationConcerns::SettingsValidation

Extended by:
ActiveSupport::Concern
Included in:
PandaPal::Organization, OrganizationBuilder, TaskScheduling
Defined in:
app/models/panda_pal/organization_concerns/settings_validation.rb

Instance Method Summary collapse

Instance Method Details

#settings_structureObject



140
141
142
# File 'app/models/panda_pal/organization_concerns/settings_validation.rb', line 140

def settings_structure
  self.class.settings_structure
end

#validate_settingsObject



144
145
146
147
148
# File 'app/models/panda_pal/organization_concerns/settings_validation.rb', line 144

def validate_settings
  validate_settings_level(settings || {}, settings_structure).each do |err|
    errors.add(:settings, err)
  end
end