# Trouble with routes in Rails 2.0

**URL:** <https://www.ruby-forum.com/t/trouble-with-routes-in-rails-2-0/124526>\
**Category:** Rails\
**Created:** [December 29, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/trouble-with-routes-in-rails-2-0/124526 "2007-12-29T20:54:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KIR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/ea666f/32.png) [@KIR](https://www.ruby-forum.com/u/KIR)\
**Post date:** [December 29, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/trouble-with-routes-in-rails-2-0/124526/1 "2007-12-29T20:54:15Z")

</div>

Hi,

I has a nested restful route in routes.rb, which works nicely with  
1.2.6:

map.resources :checklists, :member =\> {  
:invite =\> :post,  
:accept =\> :any,  
} do |checklists|  
checklists.resources :tasks, :member =\>  
{  
:invalidate =\> :any,  
:close =\> :any,  
:reopen =\> :any,  
:reorder =\> :any,

```
        :collapse => :any,
        :expand => :any,
      }

```

end

For such a definition, i used path like

tasks\_path(checklist\_id)

After upgrade to Rails 2.0, I’m getting the error message:

undefined method `tasks\_path’ for #ActionView::Base:0x69090b0

Has no idea where to look at how to fix the problem. rake routes  
doesn’t show generated paths.

Any help?

Regards,  
KIR

---

<div class="post-metadata">

**Author:** ![KIR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/ea666f/32.png) [@KIR](https://www.ruby-forum.com/u/KIR)\
**Post date:** [December 29, 2007, 9:06pm UTC](https://www.ruby-forum.com/t/trouble-with-routes-in-rails-2-0/124526/2 "2007-12-29T21:06:33Z")

</div>

Answering myself.  
There are two solutions I found:

1. Replace tasks\_path with checklist\_tasks\_path
2. Rewrite routing like:

map.resources :checklists, :member =\> {  
:invite =\> :post,  
:accept =\> :any,  
}  
map.resources :tasks, :path\_prefix =\> ‘/  
checklists/:checklist\_id’, :member =\> {  
:invalidate =\> :any,  
:close =\> :any,  
:reopen =\> :any,  
:reorder =\> :any,

```
        :collapse => :any,
        :expand => :any,
 }
```
