Forum: Ruby on Rails map.resources, format and additional params

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
18174abcca5cd20f9260a51749f8b011?d=identicon&s=25 Adam Gardiner (agardiner)
on 2007-07-12 02:37

I've hit an issue that has me a little surprised - basically, when I
specify both a format and additional parameters in my URL, via something


then params[:format] is set not to "txt" as I would expect, but to
"txt?q=Up". This in turn breaks my respond_to logic, which works fine
until additional parameters are added to the request URL.

I've simplified my routes.rb to the most basic case:

ActionController::Routing::Routes.draw do |map|
  map.resources :jobs

It seems like this should be a fairly common scenario, so maybe there is
another way I ought to be tackling this? Essentially, what I am trying
to do is allow the list of resources that would be returned from a
request to /jobs.txt to be filtered to only include those starting with
the specified value...

Any suggestions?


18174abcca5cd20f9260a51749f8b011?d=identicon&s=25 Adam Gardiner (agardiner)
on 2007-07-12 03:26
Ignore this post - it was a case of user error! (I was leaving out the
"?" in the URL - D'OH!)
This topic is locked and can not be replied to.