Module: Rooler::ApplicationHelper

Included in:
DeliveryMailer, TemplatesController
Defined in:
app/helpers/rooler/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#liquidize(content, arguments) ⇒ Object



4
5
6
# File 'app/helpers/rooler/application_helper.rb', line 4

def liquidize(content, arguments)
  Liquid::Template.parse(content).render(arguments, :filters => [Rooler::LiquidFilters]).html_safe
end

#render_tree(tree) ⇒ Object



8
9
10
11
12
13
14
# File 'app/helpers/rooler/application_helper.rb', line 8

def render_tree(tree)
  res = "<ul>"
  res << "<li>#{tree.name}"
  tree.children.each {|child| res << render_tree(child)}
  res << "</li></ul>"
  res
end