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
21 22 23 |
# File 'app/api/locomotive/api/forms/site_form.rb', line 21 def domains [*@domains] end |
#locales ⇒ Object
Make sure locales and domains are in arrays.
17 18 19 |
# File 'app/api/locomotive/api/forms/site_form.rb', line 17 def locales [*@locales] end |
#routes=(value) ⇒ Object
35 36 37 |
# File 'app/api/locomotive/api/forms/site_form.rb', line 35 def routes=(value) set_attribute(:routes, value.is_a?(String) ? parse_json(value, []) : value) end |
#sections_content=(value) ⇒ Object
31 32 33 |
# File 'app/api/locomotive/api/forms/site_form.rb', line 31 def sections_content=(value) set_attribute(:sections_content, value.is_a?(String) ? parse_json(value, {}) : value) end |
#timezone=(value) ⇒ Object
Custom setters ##
27 28 29 |
# File 'app/api/locomotive/api/forms/site_form.rb', line 27 def timezone=(value) self.timezone_name = value end |