Class: Skyline::Sections::ContentCollectionSection
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Skyline::Sections::ContentCollectionSection
show all
- Includes:
- Skyline::SectionItem, Taggable
- Defined in:
- app/models/skyline/sections/content_collection_section.rb
Instance Method Summary
collapse
Methods included from Taggable
#available_tags, #clone_with_associated_tags, #raw_tags, #raw_tags=
#to_text
Instance Method Details
#clone ⇒ Object
21
22
23
24
25
|
# File 'app/models/skyline/sections/content_collection_section.rb', line 21
def clone
returning super do |clone|
clone.associated_tags = self.associated_tags.collect{|associated_tag| associated_tag.clone}
end
end
|
#content_class ⇒ Object
9
10
11
|
# File 'app/models/skyline/sections/content_collection_section.rb', line 9
def content_class
@content_class ||= self.content_type.constantize
end
|
#content_name ⇒ Object
13
14
15
16
17
18
19
|
# File 'app/models/skyline/sections/content_collection_section.rb', line 13
def content_name
if self.content_class.name.demodulize == "Data"
self.content_class.parent.name.underscore
else
self.content_class.name.underscore
end
end
|