From 2eadcc3417b11237f9e40dd5eb5804b2fcc44c82 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 12 Feb 2013 12:53:30 +1100 Subject: Pass parameters to method rather explicitly --- app/controllers/public_body_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/public_body_controller.rb') diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index 8a4a65820..d88ab66e3 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -40,7 +40,7 @@ class PublicBodyController < ApplicationController @view = params[:view] params[:latest_status] = @view - query = make_query_from_params + query = make_query_from_params(params) query += " requested_from:#{@public_body.url_name}" # Use search query for this so can collapse and paginate easily # XXX really should just use SQL query here rather than Xapian. -- cgit v1.2.3 From aeef1a20034b0ffb57f10d3bf2d5ed291bcf789c Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 12 Feb 2013 14:11:06 +1100 Subject: Retain filter settings when redirecting a public body to its canonical url --- app/controllers/public_body_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/public_body_controller.rb') diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index d88ab66e3..49502cc2c 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -25,7 +25,7 @@ class PublicBodyController < ApplicationController end # If found by historic name, or alternate locale name, redirect to new name if @public_body.url_name != params[:url_name] - redirect_to show_public_body_url(:url_name => @public_body.url_name) + redirect_to :url_name => @public_body.url_name return end -- cgit v1.2.3 From bc0408adcacd841d2c9ee9a6d9eb0bc5541be4c4 Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Tue, 12 Feb 2013 14:14:48 +1100 Subject: Don't pass latest_status param to locale switching links. Fixes #789 --- app/controllers/public_body_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'app/controllers/public_body_controller.rb') diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index 49502cc2c..1bcc0145c 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -38,9 +38,7 @@ class PublicBodyController < ApplicationController @searched_to_send_request = true end @view = params[:view] - params[:latest_status] = @view - - query = make_query_from_params(params) + query = make_query_from_params(params.merge(:latest_status => @view)) query += " requested_from:#{@public_body.url_name}" # Use search query for this so can collapse and paginate easily # XXX really should just use SQL query here rather than Xapian. -- cgit v1.2.3