From 33e48d5f9704e94c52d50c85607efa3cd4903704 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Tue, 19 Dec 2006 17:11:26 +0000 Subject: Add a 'referer' attribute to TestRequest git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_controller/test_process.rb | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'actionpack') diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index d7dc6153b7..32cc8e0316 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Add a 'referer' attribute to TestRequest. [Jamis Buck] + * Ensure render :json => ... skips the layout. Closes #6808 [Josh Peek] * Fix HTML::Node to output double quotes instead of single quotes. Closes #6845 [mitreandy] diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index 4011e6cf33..49a8a4a0e3 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -124,6 +124,10 @@ module ActionController #:nodoc: @request_method, @accepts, @content_type = nil, nil, nil end + def referer + @env["HTTP_REFERER"] + end + private def initialize_containers @env, @cookies = {}, {} -- cgit v1.2.3