Class: Bop::Page
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Bop::Page
- Defined in:
- app/models/bop/page.rb
Instance Method Summary collapse
-
#context ⇒ Object
Fixed.
- #inherited_asset ⇒ Object
- #inherited_template ⇒ Object
-
#render ⇒ Object
currently we only support liquid for page layouts.
Instance Method Details
#context ⇒ Object
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_asset ⇒ Object
26 27 28 |
# File 'app/models/bop/page.rb', line 26 def inherited_asset asset || parent.inherited_asset end |
#inherited_template ⇒ Object
22 23 24 |
# File 'app/models/bop/page.rb', line 22 def inherited_template template || parent.inherited_template end |
#render ⇒ Object
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 |