1
我想添加一個網址到我的評論路由,所以我可以調用「post_comments_latest_path」。我添加了'get「comments/latest」=>「comments#latest」,:as =>「latest」',但是路由添加了:commend_id,而不需要該路徑。有什麼建議麼?將新路線添加到沒有添加參數的資源?
resources :posts, :except => [:index] do
resources :comments, :except => [:index, :show] do
post "replies" => "comments#create_reply", :as => "create_reply"
get "replies/new" => "comments#new_reply", :as => "new_reply"
end
end
謝謝你的回答。我對這個系列有點困惑。 – user1461119