Format parameter in RESTful named routes

In my application I have a RESTful named route:

map.resources :discussions

And I’m attempting to generate a URL like:

/discussions/27.atom

using the discussion_url helper method.

The following:

discussion_url(:id => @discussion.id, :format => ‘atom’)

just generates /discussions/27, ignoring the format parameter.

Anyone know the correct way of doing this? As far as I can see, the
docs have nothing to say on the matter.

Ta,
Ben

Ben :

The following:

discussion_url(:id => @discussion.id, :format => ‘atom’)

formatted_discussion_url(:id => @discussion.id, :format => :atom)

– Jean-François.


Ruby ( http://www.rubyfrance.org ) on Rails ( http://www.railsfrance.org
)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs