Class: Spina::LayoutPart
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Spina::LayoutPart
- Includes:
- Optionable, Part
- Defined in:
- app/models/spina/layout_part.rb
Instance Method Summary collapse
Methods included from Part
#content, #partable_attributes=, #to_s, #value
Instance Method Details
#position(theme) ⇒ Object
17 18 19 20 |
# File 'app/models/spina/layout_part.rb', line 17 def position(theme) layout_parts = theme.layout_template[:layout_parts] layout_parts.index { |layout_part| layout_part == self.name }.to_i end |