Module: Cms::Concerns::HasContentType::ClassMethods
- Defined in:
- lib/cms/concerns/has_content_type.rb
Instance Method Summary collapse
-
#content_module(module_name = nil) ⇒ Symbol
Allows a content block to configure which module it will be placed in.
-
#content_type ⇒ Object
Returns the Cms::ContentType which provides information about the content.
Instance Method Details
#content_module(module_name = nil) ⇒ Symbol
Allows a content block to configure which module it will be placed in.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/cms/concerns/has_content_type.rb', line 33 def content_module(module_name=nil) if module_name @module_name = module_name end if @module_name @module_name else :general end end |
#content_type ⇒ Object
Returns the Cms::ContentType which provides information about the content.
26 27 28 |
# File 'lib/cms/concerns/has_content_type.rb', line 26 def content_type Cms::ContentType.new(name: self.name) end |