Class: Para::Page::Section
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- 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
19 20 21 22 |
# File 'app/models/para/page/section.rb', line 19 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
25 26 27 28 |
# File 'app/models/para/page/section.rb', line 25 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
12 13 14 |
# File 'app/models/para/page/section.rb', line 12 def css_class @css_class ||= self.class.name.demodulize.underscore.gsub(/_/, '-') end |