Source

RubyLearning / ProjectTrak / vendor / rails / actionpack / lib / action_view / template_handlers / rjs.rb

Full commit
module ActionView
  module TemplateHandlers
    class RJS < TemplateHandler
      include Compilable

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