diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-04-30 23:31:20 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-04-30 23:46:34 -0500 |
commit | 1fcc7dbcc8dcf7f1d42ca8486ad313f0c805033a (patch) | |
tree | 4ff5acd5af83ae7b771f863505fd52a838a46a27 /actionpack/lib/action_dispatch | |
parent | dc9f53b05b650614520086ae780ca5e58efe65b1 (diff) | |
download | rails-1fcc7dbcc8dcf7f1d42ca8486ad313f0c805033a.tar.gz rails-1fcc7dbcc8dcf7f1d42ca8486ad313f0c805033a.tar.bz2 rails-1fcc7dbcc8dcf7f1d42ca8486ad313f0c805033a.zip |
Move TestRequest#query_parameters into AD TestRequest
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rwxr-xr-x | actionpack/lib/action_dispatch/http/request.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/testing/test_request.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index c28f59dbd6..e4f3a8f125 100755 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -351,7 +351,7 @@ EOM # Returns the query string, accounting for server idiosyncrasies. def query_string - @env['QUERY_STRING'].present? ? @env['QUERY_STRING'] : (@env['REQUEST_URI'].split('?', 2)[1] || '') + @env['QUERY_STRING'].present? ? @env['QUERY_STRING'] : (@env['REQUEST_URI'].to_s.split('?', 2)[1] || '') end # Returns the request URI, accounting for server idiosyncrasies. diff --git a/actionpack/lib/action_dispatch/testing/test_request.rb b/actionpack/lib/action_dispatch/testing/test_request.rb index bd6c26b69b..5d8cd7e619 100644 --- a/actionpack/lib/action_dispatch/testing/test_request.rb +++ b/actionpack/lib/action_dispatch/testing/test_request.rb @@ -39,6 +39,10 @@ module ActionDispatch @env['PATH_INFO'] = path end + def action=(action_name) + path_parameters["action"] = action_name.to_s + end + def if_modified_since=(last_modified) @env['HTTP_IF_MODIFIED_SINCE'] = last_modified end |