Module: Smithy::TemplatesHelper
- Includes:
- Liquid::Rendering
- Defined in:
- app/helpers/smithy/templates_helper.rb
Instance Method Summary collapse
Instance Method Details
#render_smithy_nav(options = "") ⇒ Object
5 6 7 8 |
# File 'app/helpers/smithy/templates_helper.rb', line 5 def render_smithy_nav(="") context = ::Liquid::Context.new({}, smithy_default_assigns, smithy_default_registers, false) ::Liquid::Template.parse("{% nav #{} %}").render(liquid_context) end |
#render_smithy_partial(partial_name) ⇒ Object
10 11 12 13 14 |
# File 'app/helpers/smithy/templates_helper.rb', line 10 def render_smithy_partial(partial_name) partial_template = Smithy::Template.partials.find_by_name(partial_name) return if partial_template.blank? partial_template.liquid_template.render(liquid_context) end |