Sha256: df2ed87ac17b83e8f06a6e38b5d280849ae195ebe611913ef6f64f655db01c5c
Contents?: true
Size: 764 Bytes
Versions: 4
Compression:
Stored size: 764 Bytes
Contents
require 'hanami/views/default_template_finder' module Hanami module Views # The default view that is rendered for non successful responses (200 and 201) # # @since 0.1.0 # @api private class Default include Hanami::View configuration.reset! layout nil root Pathname.new(File.dirname(__FILE__)).join('../templates').realpath template 'default' def title response[2].first end def self.render(root, template_name, context) format = context[:format] template = DefaultTemplateFinder.new(self, root, template_name, format).find if template new(template, context).render else super(context) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
hanami-0.7.3 | lib/hanami/views/default.rb |
hanami-0.7.2 | lib/hanami/views/default.rb |
hanami-0.7.1 | lib/hanami/views/default.rb |
hanami-0.7.0 | lib/hanami/views/default.rb |