Class: Para::Page::Section
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Para::Page::Section
- Defined in:
- app/models/para/page/section.rb
Class Method Summary collapse
-
.section_resource(*args, &block) ⇒ Object
This method is a shortcut to create a has_one through relation.
-
.section_resources(*args, &block) ⇒ Object
This method is a shortcut to create a has_many through relation.
Instance Method Summary collapse
Class Method Details
.section_resource(*args, &block) ⇒ Object
This method is a shortcut to create a has_one through relation
26 27 28 29 |
# File 'app/models/para/page/section.rb', line 26 def section_resource(*args, &block) _ensure_section_resource_relation _create_section_resource_has_one_relation_for(*args, &block) end |
.section_resources(*args, &block) ⇒ Object
This method is a shortcut to create a has_many through relation
32 33 34 35 |
# File 'app/models/para/page/section.rb', line 32 def section_resources(*args, &block) _ensure_section_resources_relation _create_section_resource_has_many_relation_for(*args, &block) end |
Instance Method Details
#css_class ⇒ Object
19 20 21 |
# File 'app/models/para/page/section.rb', line 19 def css_class @css_class ||= self.class.name.demodulize.underscore.gsub(/_/, '-') end |