Rails: Custom nested controller actions

前端 未结 2 2039
无人共我
无人共我 2020-12-18 08:12

I want to setup a custom nested controller actions but I can\'t figure out the routing.

I keep getting the following error

No route matches [GET] \"/         


        
2条回答
  •  無奈伤痛
    2020-12-18 08:40

    in your route file:

    match 'request/accept/:id' => 'requests#accept', :as => :accept
    

    and in view

    link_to "Accept", accept_path(request) 
    

提交回复
热议问题