Class: Locomotive::API::Forms::SiteForm
- Defined in:
- app/api/locomotive/api/forms/site_form.rb
Instance Attribute Summary
Attributes inherited from BaseForm
Instance Method Summary collapse
- #domains ⇒ Object
-
#locales ⇒ Object
Make sure locales and domains are in arrays.
- #routes=(value) ⇒ Object
- #sections_content=(value) ⇒ Object
-
#timezone=(value) ⇒ Object
Custom setters ##.
Methods inherited from BaseForm
attributes, attrs, define_attribute, #persisted?, #serializable_hash, #set_attribute
Instance Method Details
#domains ⇒ Object
19 20 21 |
# File 'app/api/locomotive/api/forms/site_form.rb', line 19 def domains [*@domains] end |
#locales ⇒ Object
Make sure locales and domains are in arrays.
15 16 17 |
# File 'app/api/locomotive/api/forms/site_form.rb', line 15 def locales [*@locales] end |
#routes=(value) ⇒ Object
33 34 35 |
# File 'app/api/locomotive/api/forms/site_form.rb', line 33 def routes=(value) set_attribute(:routes, value.is_a?(String) ? parse_json(value, []) : value) end |
#sections_content=(value) ⇒ Object
29 30 31 |
# File 'app/api/locomotive/api/forms/site_form.rb', line 29 def sections_content=(value) set_attribute(:sections_content, value.is_a?(String) ? parse_json(value, {}) : value) end |
#timezone=(value) ⇒ Object
Custom setters ##
25 26 27 |
# File 'app/api/locomotive/api/forms/site_form.rb', line 25 def timezone=(value) self.timezone_name = value end |