search for: parse_query_parameters

Displaying 5 results from an estimated 5 matches for "parse_query_parameters".

2006 Dec 29
4
Remote API passing in parameter named 'action', routing loses it
I''m working with a remote API that calls a URL in my app, passing in a parameter named action. So the request would look like: http://localhost/my_controller?action=foo Routing correctly interprets the controller action as index. However, it sets params[:action] to index as well. I know that''s how it''s supposed to work...but it means I lose the action parameter
2006 Jul 27
2
more on file upload
...h a FCGI::Stream object ..... this is what rails do for CGI, I''m not sure if it works the same for FCGI, I have not found the code yet. require actionpack-1.12.3/lib/action_controller/cgi_ext/cgi_methods.rb def query_parameters (qs = self.query_string).empty? ? {} : CGIMethods.parse_query_parameters(qs) end def request_parameters if ActionController::Base.param_parsers.has_key?(content_type) CGIMethods.parse_formatted_request_parameters(content_type, @env[''RAW_POST_DATA'']) else CGIMethods.parse_request_parameters(@cgi.params) end...
2006 Apr 11
0
Page cache and query string
...ler < ApplicationController caches_page :bar before_filter :merge_query_string def bar render :text => "You asked for #{params.inspect}" end private def merge_query_string params[:query_string] or return params. update(CGIMethods.parse_query_parameters(params[:query_string])). delete(:query_string) end end When a request comes for /foo/bar?a=b, it is cached as /foo/bar/query/a=b, and when it comes for /foo/bar?a=x, it is cached separately as /foo/bar/query/a=x. Apparently it''s working. Where''s the catch? Thanks...
2007 Nov 29
5
Webrat 0.1.0 released - Ruby Acceptance Testing for Web applications
Hey guys, We developed this plugin while writing my first real set of RSpec stories. It''s still missing a lot of functionality, but it''s useful to us as is, so I''m shipping 0.1.0. (Patches welcome. :) ) Code is available at: http://svn.eastmedia.net/public/plugins/webrat/ What do you think? -Bryan Here''s the README:
2007 May 21
4
Spec''ing redirect with arbitrary parameters
I''ve got the following expectation: response.should redirect_to(:action => "new", :video_id => "1", :process_id => "2", :origin_id => "3") that fails with this error message: expected redirect to {:video_id=>"1", :process_id=>"2", :origin_id=>"3", :action=>"new"}, got redirect to