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
17 18 19 20 |
# File 'app/models/para/page/section.rb', line 17 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
23 24 25 26 |
# File 'app/models/para/page/section.rb', line 23 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
10 11 12 |
# File 'app/models/para/page/section.rb', line 10 def css_class @css_class ||= self.class.name.demodulize.underscore.gsub(/_/, '-') end |