From 7ee5d4ac0b91c32b983891d8025b00614a80b523 Mon Sep 17 00:00:00 2001 From: Thiago Pradi Date: Wed, 1 Sep 2010 19:46:43 -0300 Subject: [PATCH 2/2] Removing RJS hack --- actionpack/lib/action_view/base.rb | 5 ----- .../lib/action_view/helpers/prototype_helper.rb | 2 +- 2 files changed, 1 insertions(+), 6 deletions(-) diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index ff25c36..b0a57f4 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -188,11 +188,6 @@ module ActionView #:nodoc: delegate :logger, :to => :controller, :allow_nil => true - # TODO: HACK FOR RJS - def view_context - self - end - def self.xss_safe? #:nodoc: true end diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index 99f9363..b600666 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -579,7 +579,7 @@ module ActionView # page.hide 'spinner' # end def update_page(&block) - JavaScriptGenerator.new(view_context, &block).to_s.html_safe + JavaScriptGenerator.new(self, &block).to_s.html_safe end # Works like update_page but wraps the generated JavaScript in a