Class: ActionView::TemplateHandlers::RJS

Inherits:
ActionView::TemplateHandler show all
Includes:
Compilable
Defined in:
lib/action_view/template_handlers/rjs.rb

Instance Method Summary collapse

Methods included from Compilable

included

Methods inherited from ActionView::TemplateHandler

call, #initialize, #render

Constructor Details

This class inherits a constructor from ActionView::TemplateHandler

Instance Method Details

#compile(template) ⇒ Object


6
7
8
9
# File 'lib/action_view/template_handlers/rjs.rb', line 6

def compile(template)
  "controller.response.content_type ||= Mime::JS;" +
    "update_page do |page|;#{template.source}\nend"
end