Class: Tomify::Setting
- Inherits:
-
Object
show all
- Defined in:
- app/models/tomify/setting.rb
Defined Under Namespace
Classes: Boolean, Json, Text
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.admin_params ⇒ Object
19
20
21
|
# File 'app/models/tomify/setting.rb', line 19
def self.admin_params
[:type, :name, :value, :json]
end
|
.public ⇒ Object
11
12
13
|
# File 'app/models/tomify/setting.rb', line 11
def self.public
where(public: true)
end
|
.required_settings ⇒ Object
15
16
17
|
# File 'app/models/tomify/setting.rb', line 15
def self.required_settings
["allow_signup", "name", "email", "timezone"]
end
|
Instance Method Details
#serializable_hash(options = nil) ⇒ Object
23
24
25
26
|
# File 'app/models/tomify/setting.rb', line 23
def serializable_hash(options = nil)
options ||= {}
super({ methods: [:type] }.update(options))
end
|