aboutsummaryrefslogblamecommitdiffstats
path: root/actionpack/lib/action_view/template_handlers/compilable.rb
blob: a0ebaefeefeb8ad39db94a841fa075f2e86f7ef4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13


                         









                                                                   
 

                                                     
         

       
   
module ActionView
  module TemplateHandlers
    module Compilable
      def self.included(base)
        base.extend ClassMethod
      end

      module ClassMethod
        # If a handler is mixin this module, set compilable to true
        def compilable?
          true
        end
      end

      def render(template, local_assigns = {})
        @view.send(:execute, template, local_assigns)
      end
    end
  end
end