Fork me on GitHub

route

    Restrict auto-generated routes.

    19 Aug 2011

    Andy Wang (wangyaodi@gmail.com)

    By default, Rails generates seven RESTful routes(new,edit,create,destroy,index,show, update) for a resource, sometime the resource only needs one or two routes, so just user :only or :except while defining routes to speedup the routing. Read More

    Tags 


    split route namespaces into different files

    04 May 2011

    Richard Huang (flyerhzm@gmail.com)

    the routes will become complicated with the growth of your application, contain different namespaces, each with a lot of resources and custom routes, it would be better to split routes into different files according to the namespaces, which makes it easy to maintain the complicated routes. Read More

    Tags 


    Overuse route customizations

    22 Jul 2010

    Wen-Tien Chang (ihower@gmail.com)

    According to Roy Fielding’s doctoral thesis, we should use restful routes to represent the resource and its state. Use the default 9 actions without overusing route customizations. Read More

    Tags 


    Not use default route if you use RESTful design

    22 Jul 2010

    Wen-Tien Chang (ihower@gmail.com)

    If you use RESTful design, you should NOT use default route. It will cause a security problem. I explain at http://ihower.tw/blog/archives/3265 too. Read More

    Tags 


    Needless deep nesting

    22 Jul 2010

    Wen-Tien Chang (ihower@gmail.com)

    Some people will define 3 or more level nested routes, it's a kind of over design and not recommended. Read More

    Tags