diff options
Diffstat (limited to 'actionpack/lib/action_view/template/handlers/rjs.rb')
-rw-r--r-- | actionpack/lib/action_view/template/handlers/rjs.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/template/handlers/rjs.rb b/actionpack/lib/action_view/template/handlers/rjs.rb new file mode 100644 index 0000000000..802a79b3fc --- /dev/null +++ b/actionpack/lib/action_view/template/handlers/rjs.rb @@ -0,0 +1,13 @@ +module ActionView + module TemplateHandlers + class RJS < TemplateHandler + include Compilable + + def compile(template) + "@formats = [:html];" + + "controller.response.content_type ||= Mime::JS;" + + "update_page do |page|;#{template.source}\nend" + end + end + end +end |