Module: Racket::Helpers::View
- Defined in:
- lib/racket/helpers/view.rb
Overview
Helper module that handles views
Instance Method Summary collapse
-
#render_template(template, context = self) ⇒ String|nil
Renders a template file using the specified context.
Instance Method Details
#render_template(template, context = self) ⇒ String|nil
Renders a template file using the specified context.
29 30 31 32 33 |
# File 'lib/racket/helpers/view.rb', line 29 def render_template(template, context = self) template = Utils.build_path(template) return nil unless Utils.file_readable?(template) Tilt.new(template).render(context) end |