Module: Cannon::Views
Instance Method Summary collapse
Methods included from PathCache
Instance Method Details
#view(filename, options = {}) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/cannon/views.rb', line 7 def view(filename, = {}) reload_cache if outdated_cache? file, content_type = *file_and_content_type("#{base_path}/#{filename}") header('Content-Type', content_type) send(Mustache.render(file, ), status: status) end |