Class: Spina::PagePart

Inherits:
ApplicationRecord show all
Includes:
Optionable, Part
Defined in:
app/models/spina/page_part.rb

Instance Method Summary collapse

Methods included from Part

#content, #partable_attributes=, #to_s, #value

Instance Method Details

#position(theme) ⇒ Object



18
19
20
# File 'app/models/spina/page_part.rb', line 18

def position(theme)
  page.view_template_config(theme)[:page_parts].index { |page_part| page_part == self.name }.to_i
end