Class: Locomotive::EditableModel
Instance Attribute Summary
#block_name, #block_priority
Instance Method Summary
collapse
#_type, #add_current_locale, #block_label, #by_priority, #disabled?, #page, #page_id, #path, #slug
Instance Method Details
#content_type ⇒ Object
4
5
6
|
# File 'app/models/locomotive/editable_model.rb', line 4
def content_type
@content_type ||= self.page.site.content_types.by_id_or_slug(self.slug).first
end
|
#content_type? ⇒ Boolean
12
13
14
|
# File 'app/models/locomotive/editable_model.rb', line 12
def content_type?
!content_type.nil?
end
|
#label ⇒ Object
8
9
10
|
# File 'app/models/locomotive/editable_model.rb', line 8
def label
self.content_type.name
end
|