From c40b1a4a67ccaa3be31edb13399d93da0c628567 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 7 Aug 2006 12:40:14 +0000 Subject: Deprecate direct usage of @params. Update ActionView::Base for instance var deprecation. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4715 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/action_pack_assertions_test.rb | 2 +- actionpack/test/controller/components_test.rb | 2 +- actionpack/test/controller/verification_test.rb | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'actionpack/test/controller') diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index 0ef31cb851..56b1752392 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -54,7 +54,7 @@ class ActionPackAssertionsController < ActionController::Base end def render_based_on_parameters - render_text "Mr. #{@params["name"]}" + render_text "Mr. #{params[:name]}" end def render_url diff --git a/actionpack/test/controller/components_test.rb b/actionpack/test/controller/components_test.rb index 075bc98a28..57e3b21acf 100644 --- a/actionpack/test/controller/components_test.rb +++ b/actionpack/test/controller/components_test.rb @@ -46,7 +46,7 @@ end class CalleeController < ActionController::Base def being_called - render_text "#{@params["name"] || "Lady"} of the House, speaking" + render_text "#{params[:name] || "Lady"} of the House, speaking" end def blowing_up diff --git a/actionpack/test/controller/verification_test.rb b/actionpack/test/controller/verification_test.rb index dc95c4b8a1..a3a913d42f 100644 --- a/actionpack/test/controller/verification_test.rb +++ b/actionpack/test/controller/verification_test.rb @@ -34,15 +34,15 @@ class VerificationTest < Test::Unit::TestCase verify :only => :must_be_post, :method => :post, :render => { :status => 405, :text => "Must be post" }, :add_headers => { "Allow" => "POST" } def guarded_one - render :text => "#{@params["one"]}" + render :text => "#{params[:one]}" end def guarded_with_flash - render :text => "#{@params["one"]}" + render :text => "#{params[:one]}" end def guarded_two - render :text => "#{@params["one"]}:#{@params["two"]}" + render :text => "#{params[:one]}:#{params[:two]}" end def guarded_in_session @@ -70,7 +70,7 @@ class VerificationTest < Test::Unit::TestCase end def unguarded - render :text => "#{@params["one"]}" + render :text => "#{params[:one]}" end def two_redirects -- cgit v1.2.3