aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template_handlers/rjs.rb
blob: 4ca9fc3277f8dd54da47a899801f183cb467cb01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module ActionView
  module TemplateHandlers
    class RJS < TemplateHandler
      def self.line_offset
        2
      end

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