Class: ActionView::TemplateHandlers::RJS

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ActionView::TemplateHandler

#initialize, #render

Constructor Details

This class inherits a constructor from ActionView::TemplateHandler

Class Method Details

.line_offsetObject



4
5
6
# File 'lib/action_view/template_handlers/rjs.rb', line 4

def self.line_offset
  2
end

Instance Method Details

#compile(template) ⇒ Object



8
9
10
11
# File 'lib/action_view/template_handlers/rjs.rb', line 8

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