Module: Cms::Concerns::HasContentType

Defined in:
lib/cms/concerns/has_content_type.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Instance Method Summary collapse

Instance Method Details

#has_content_type(options = {}) ⇒ Object

Adds ContentType information to the object.

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :module (Symbol)

    The module name, same as would be passed to content_module()



8
9
10
11
12
13
14
15
16
# File 'lib/cms/concerns/has_content_type.rb', line 8

def has_content_type(options={})
  include InstanceMethods
  extend ClassMethods

  if options[:module]
    content_module options[:module]
  end

end