Displaying 1 result from an estimated 1 matches for "merge_query_string".
2006 Apr 11
0
Page cache and query string
...en in config/routes.rb there
is:
map.connect(''foo/bar/query/:query_string'',
:controller => ''foo'',
:action => ''bar'')
In foo_controller.rb:
class FooController < 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
e...