routes in rails - removing actions when setting up a resource

后端 未结 1 1185

I\'ve setup a simple app and added a scaffold to do some of the work for me (I\'m a noob).

  resources :cars

How do I remove certain actions fr

1条回答
  •  情歌与酒
    2021-02-05 03:26

    resources :cars, :except => [:new, :index, :delete]
    

    or

    resources :cars, :only => [:show, :edit]
    

    Also take a look at Rails Guides

    0 讨论(0)
提交回复
热议问题