From fd9c5f14863e7aa02d31e22f9bb11484bb595966 Mon Sep 17 00:00:00 2001 From: francis Date: Tue, 27 May 2008 11:16:04 +0000 Subject: Make search tracks work for queries with dots and slashes. --- app/controllers/track_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/controllers/track_controller.rb') diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb index 6bdd8960f..b010a5798 100644 --- a/app/controllers/track_controller.rb +++ b/app/controllers/track_controller.rb @@ -5,7 +5,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: track_controller.rb,v 1.21 2008-05-21 14:51:34 francis Exp $ +# $Id: track_controller.rb,v 1.22 2008-05-27 11:16:05 francis Exp $ class TrackController < ApplicationController @@ -97,7 +97,11 @@ class TrackController < ApplicationController # Track a search term def track_search_query - @query = params[:query] + # XXX should be better thing in rails routes than having to do this + # join just to get / and . to work in a query. + query_array = params[:query_array] + @query = query_array.join("/") + @track_thing = TrackThing.create_track_for_search_query(@query) ret = self.track_set if ret -- cgit v1.2.3