Forum: Ruby on Rails Rails 2.2 routing problem

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.
Michael R. (Guest)
on 2009-01-07 22:30
Hi all

I just upgraded a project of mine from rails 2.1 to 2.2. Becouse of this
upgrade, I have a link that doesn't work anymore. I get an error when
rendering the page:

outgoing_invoice_url failed to generate from {:action=>"show",
:override=>true, :controller=>"outgoing_invoices", :id=>"2297.pdf"},
expected: {:action=>"show", :controller=>"outgoing_invoices"}, diff:
{:override=>true, :id=>"2297.pdf"}

I have build the link as followed:

<%= "#{outgoing_invoice_path("#{}.pdf", :override =>
true)}" %>

It should render the link for the show action but also needs to send a
parameter with it.
This worked in Rails 2.1. I know that there are some routing changes in
rails 2.2, but I can't see what is wrong with mine.

Could anyone help me?

Thanks in advance for the help.
cassiozen (Guest)
on 2009-01-07 22:44
(Received via mailing list)
You could try to use formatted_items_path(:pdf)

On Jan 7, 6:30 pm, Michael R. <removed_email_address@domain.invalid>
Michael R. (Guest)
on 2009-01-09 16:02
cassiozen wrote:
> You could try to use formatted_items_path(:pdf)
> On Jan 7, 6:30�pm, Michael R. <removed_email_address@domain.invalid>

formatted_items_path nor, formatted_item_path seems to work. Both result
in a no method error.
This topic is locked and can not be replied to.