摘要:
Router的好处1 能使你的URL更符合REST规范,而不是带着参数的URL2 能让你的View使用Path,而不是直接硬编码3 统一放置,方便管理Router,View的对用关系GET/photosindexdisplay a list of all photosphotos_path GET/photos/newnewreturn an HTML form for creating a new photonew_photo_pathPOST/photocreatecreate a new photophoto_path GET/photos/:idshowdisplay a specif 阅读全文