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,
}
On Dec 29, 9:53 pm, KIR
<kirill.maxi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> 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
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---