0

I have the following routes:

resources :projects do
    resources :milestones, :comments
end

resources :comments do
    member {post :hide}
end 

And I want to be able to write something like:

resources :projects do
    resources :milestones, 
    resources :comments do 
        member {post :hide}
    end
end

But this throws an error.

I have searched the Internet but can't seem to find exactly my problem. Any help would be appreciated.

4

1 回答 1

1

删除资源:里程碑和资源:评论之间的逗号。你的代码应该是

    resources :projects do
        resources :milestones 
        resources :comments do 
            member {post :hide}
        end
    end
于 2013-09-11T20:34:08.990 回答