Class: Locomotive::Mounter::Models::EditableElement
- Defined in:
- lib/locomotive/mounter/models/editable_element.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
other accessors.
-
#slug ⇒ Object
other accessors.
Attributes inherited from Base
#_id, #created_at, #mounting_point, #updated_at
Instance Method Summary collapse
-
#content ⇒ Object
fields ##.
-
#to_params ⇒ Object
methods ##.
- #to_yaml ⇒ Object
Methods inherited from Base
Methods included from Fields
#[], #attributes, #attributes_with_translations, #initialize, #localized_field?, #to_hash, #translated_in, #translated_in?, #write_attributes
Constructor Details
This class inherits a constructor from Locomotive::Mounter::Models::Base
Instance Attribute Details
#block ⇒ Object
other accessors
11 12 13 |
# File 'lib/locomotive/mounter/models/editable_element.rb', line 11 def block @block end |
#slug ⇒ Object
other accessors
11 12 13 |
# File 'lib/locomotive/mounter/models/editable_element.rb', line 11 def slug @slug end |
Instance Method Details
#content ⇒ Object
fields ##
8 |
# File 'lib/locomotive/mounter/models/editable_element.rb', line 8 field :content, localized: true |
#to_params ⇒ Object
methods ##
15 16 17 |
# File 'lib/locomotive/mounter/models/editable_element.rb', line 15 def to_params { block: self.block, slug: self.slug, content: self.content } end |
#to_yaml ⇒ Object
19 20 21 |
# File 'lib/locomotive/mounter/models/editable_element.rb', line 19 def to_yaml { "#{block}/#{slug}" => content } end |