mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
12 lines
237 B
Ruby
12 lines
237 B
Ruby
class SettingGroup < ActiveRecord::Base
|
|
has_many :settings
|
|
|
|
accepts_nested_attributes_for :settings
|
|
|
|
DOMAIN_VALIDATION_CODE = 'domain_validation'
|
|
|
|
def get(key)
|
|
s = settings.find_by(code: key.to_s)
|
|
s.try(:value)
|
|
end
|
|
end
|