What have you found for these years?

2009-08-04

routes 重整計畫

updated: 更正,我要保留 map.resources, 因為大多都用得上

全部改用手寫的 routes generator 後,
下一個步驟是把 named routes 全部拿掉看能不能動

接著幹掉 route helper, 這是拿來 monkey patch
rails 的 named routes 用的。

再幹掉 map resources, 一律用手寫的 routes 去對應,
最後修改 in_place_editing, 不要用 default routes...

最後的最後,default routes 就可以拿掉了,可喜可賀。
這樣就不會看到一堆莫名其妙的 action...
寫大網站,千萬別用 rails routes 啊

fancy 的東西還是留給玩具用吧

p.s. 還有不要用 with_options 了,hash merge 才是王道

0 retries:

Post a Comment

Note: Only a member of this blog may post a comment.



All texts are licensed under CC Attribution 3.0