开发者

Cleaner way to add routes to already defined resources :users

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜