Sha256: 3c797b177b1ae458ab0b7efece72b3064c482be265e247dd7513f9fbdc388a74
Contents?: true
Size: 553 Bytes
Versions: 8
Compression:
Stored size: 553 Bytes
Contents
require 'ruhl' module Ruhl class Plugin < ActionView::TemplateHandler def initialize(action_view) @action_view = action_view end def render(template, options = {}) layout = @action_view.controller.send(:active_layout) options[:layout] = layout.filename options[:layout_source] = layout.source Ruhl::Engine.new(template.source, options).render(@action_view) end end end ActionView::Template.register_template_handler(:ruhl, Ruhl::Plugin) ActionView::Template.exempt_from_layout(:ruhl)
Version data entries
8 entries across 8 versions & 1 rubygems