0
我在rails 2 vs 3比较pdf讲座中看到了这一点,我不确定预览和归档标志会发生什么情况。奇怪的Rails 2路由问题
post.resources :comments, :member => { :preview => :post },
:collection => { :archived => :get }
任何想法?
我在rails 2 vs 3比较pdf讲座中看到了这一点,我不确定预览和归档标志会发生什么情况。奇怪的Rails 2路由问题
post.resources :comments, :member => { :preview => :post },
:collection => { :archived => :get }
任何想法?
:member => { :preview => :post}
是会想这样访问的成员上建立另一种方法:
comments/1/preview
并且将只能通过邮寄访问。
同样,:collection => {:archived => :get}
确立了整个集合的方法,这将通过
comments/archived