Module: Locomotive::Concerns::ContentType::ClassHelpers

Extended by:
ActiveSupport::Concern
Included in:
Locomotive::ContentType
Defined in:
app/models/locomotive/concerns/content_type/class_helpers.rb

Instance Method Summary collapse

Instance Method Details

#class_name_to_content_type(class_name) ⇒ Object


8
9
10
# File 'app/models/locomotive/concerns/content_type/class_helpers.rb', line 8

def class_name_to_content_type(class_name)
  self.class.class_name_to_content_type(class_name, self.site)
end

#entries_classClass

Get the class of the entries

Returns:

  • (Class)

    The class of the entries


16
17
18
# File 'app/models/locomotive/concerns/content_type/class_helpers.rb', line 16

def entries_class
  self.klass_with_custom_fields(:entries)
end

#entries_class_nameString

Get the class name of the entries.

Returns:

  • (String)

    The class name of all the entries


24
25
26
# File 'app/models/locomotive/concerns/content_type/class_helpers.rb', line 24

def entries_class_name
  self.entries_class.to_s
end