Вопрос

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.

Это было полезно?

Решение

Delete the comma between resources :milestones and resources :comments. Your code should be

    resources :projects do
        resources :milestones 
        resources :comments do 
            member {post :hide}
        end
    end
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top