Top Level Namespace
Instance Method Summary collapse
Instance Method Details
#render(template, binding) ⇒ Object
3 4 5 6 |
# File 'lib/django-recipes/helpers.rb', line 3 def render(template, binding) template = File.read("#{File.dirname(__FILE__)}/templates/#{template}.erb") result = ERB.new(template).result(binding) end |