开发者

Cleaner way to add routes to already defined resources :users

开发者 https://www.devze.com 2023-02-14 07:27 出处:网络
My routes.rb has: resources :users Now if I add more routes in my users_controller, is there a way to bunch them together somehow开发者_运维问答 instead of having a seperate line for each new route

My routes.rb has:

resources :users

Now if I add more routes in my users_controller, is there a way to bunch them together somehow开发者_运维问答 instead of having a seperate line for each new route I add?

resources :users

# routes for signin, signout, password_recovery that are in users_controller

This is rails 3.


You can add routes that act on the collection or individual members with the member and collection block.

See the "Adding More RESTful Actions" section of the Rail's routing guide.

0

精彩评论

暂无评论...
验证码 换一张
取 消