Class: Bop::Page

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/bop/page.rb

Instance Method Summary collapse

Instance Method Details

#contextObject

Fixed



36
37
38
39
40
41
42
43
44
# File 'app/models/bop/page.rb', line 36

def context
  @context ||= {
    :page => self,
    :asset => inherited_asset,
    :race => race,
    :user => User.current,
    :account => Account.current
  }
end

#inherited_assetObject



26
27
28
# File 'app/models/bop/page.rb', line 26

def inherited_asset
  asset || parent.inherited_asset
end

#inherited_templateObject



22
23
24
# File 'app/models/bop/page.rb', line 22

def inherited_template
  template || parent.inherited_template
end

#renderObject

currently we only support liquid for page layouts



31
32
33
# File 'app/models/bop/page.rb', line 31

def render
  inherited_template.compiled.render(context)
end