# Rails 2.2 routing problem

**URL:** <https://www.ruby-forum.com/t/rails-2-2-routing-problem/157148>\
**Category:** Rails\
**Created:** [January 7, 2009, 9:30pm UTC](https://www.ruby-forum.com/t/rails-2-2-routing-problem/157148 "2009-01-07T21:30:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![roa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e7dd6/32.png) [@roa](https://www.ruby-forum.com/u/roa)\
**Post date:** [January 7, 2009, 9:30pm UTC](https://www.ruby-forum.com/t/rails-2-2-routing-problem/157148/1 "2009-01-07T21:30:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![roa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e7dd6/32.png) [@roa](https://www.ruby-forum.com/u/roa)\
**Post date:** [January 7, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/rails-2-2-routing-problem/157148/2 "2009-01-07T21:44:50Z")

</div>

You could try to use formatted\_items\_path(:pdf)

On Jan 7, 6:30 pm, Michael R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![roa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8e7dd6/32.png) [@roa](https://www.ruby-forum.com/u/roa)\
**Post date:** [January 9, 2009, 3:02pm UTC](https://www.ruby-forum.com/t/rails-2-2-routing-problem/157148/3 "2009-01-09T15:02:50Z")

</div>

cassiozen wrote:

> You could try to use formatted\_items\_path(:pdf)
> 
> On Jan 7, 6:30ï¿½pm, Michael R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

formatted\_items\_path nor, formatted\_item\_path seems to work. Both result  
in a no method error.
