aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/track_controller.rb
diff options
context:
space:
mode:
authorFrancis Irving <francis@mysociety.org>2010-10-09 04:34:09 +0100
committerFrancis Irving <francis@mysociety.org>2010-10-09 04:34:09 +0100
commit0e1f388373d35e442e28135b27cc3b7d4ed1f9ca (patch)
treef331710dfd9ddb7bafd810a3fde4766e6199cc30 /app/controllers/track_controller.rb
parent91ea937de9225a7bc748f51470eb6c7f3397e0c8 (diff)
Remove superfluous routes, make search query feeds work.
Diffstat (limited to 'app/controllers/track_controller.rb')
-rw-r--r--app/controllers/track_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb
index ff17eb25f..f24994276 100644
--- a/app/controllers/track_controller.rb
+++ b/app/controllers/track_controller.rb
@@ -70,6 +70,13 @@ class TrackController < ApplicationController
# join just to get / and . to work in a query.
query_array = params[:query_array]
@query = query_array.join("/")
+
+ # XXX more hackery to make alternate formats still work with query_array
+ if /^(.*)\.json$/.match(@query)
+ @query = $1
+ params[:format] = "json"
+ end
+
@track_thing = TrackThing.create_track_for_search_query(@query)
return atom_feed_internal if params[:feed] == 'feed'