Sha256: c617b0c6dd5b6da6dcee26d50e387dd9d7a6ecc3079db88e81ac9589ba3fcd7a
Contents?: true
Size: 654 Bytes
Versions: 5
Compression:
Stored size: 654 Bytes
Contents
require 'fortitude/rails/renderer' module Fortitude module Rails class TemplateHandler def call(template, &block) require_dependency template.identifier widget_class_name = "views/#{template.identifier =~ %r(views/([^.]*)(\..*)?\.rb) && $1}".camelize is_partial = File.basename(template.identifier) =~ /^_/ <<-SRC Fortitude::Rails::Renderer.render(#{widget_class_name}, self, local_assigns) { |*args| yield *args } SRC end def supports_streaming? true end end end end ActionView::Template.register_template_handler :rb, Fortitude::Rails::TemplateHandler.new
Version data entries
5 entries across 5 versions & 1 rubygems