Rails 2 thinks my function name is the ID for show()


I wrote a RoR application using "Generators" / "scaffold" in Rails
1.2.6 (via RadRails). Now that I've upgraded to Rails 2.0.2., the
generated Controller is more REST-like; and that's fine with me.

I'm used to creating new access functions, like this:

def simple_list_for_prod_id_xml
      @foo_bars = FooBars.find_by_sql(
        ["SELECT blah blah blah FROM FOO_BARS WHERE PROD_ID=?",
params[:prod_id]] )

      render :xml => @foo_bars.to_xml

Unfortunately, when I try to access it via the URL
the server thinks I'm implicitly calling the generated show() function
and passing it an ID of "simple_list_for_prod_id_xml"... What can I do
to make sure my function is called?

I apologize if this has been answered before, but I was unable to find
a relevant post. Thanks,


I obtained a solution from Railsfrance and just modified the following
line in routes.rb:

map.resources :foo_bars, :collection => { :simple_list_for_prod_id_xml
=> :get }