if you are using:

map.resources :documents

then something like:

<%= formatted_document_path(@document,:pdf) %>

it might be

<%= formatted_document_path(:id => @document, :format => 'pdf') %>

-Nate

matthew clark wrote:
Hi,

I've created a custom mime type to handle requests with a .pdf
extension.  Doing this RESTfully, in the respond_to for the show
method, I can then do a format.pdf {}.

That part I've got down.  My question is what the custom method looks
like to generate the route for a link_to

So,

document_path(@document) generates "/documents/2"

How do I generate "documents/2.pdf"?

matt
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby


_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to