You could try to use formatted_items_path(:pdf)
On Jan 7, 6:30 pm, Michael Rigart <[email protected]>
wrote:
> 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("#{outgoing_invoice.id}.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.
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---