I saw this in a rails 2 vs 3 comparison pdf lecture and I'm not sure what's going on with the preview and archived flags.
post.resources :comments, :member =&开发者_如何学运维gt; { :preview => :post },
:collection => { :archived => :get }
Any ideas?
:member => { :preview => :post}
Is establishing another method on the member that would would be accessed like so:
comments/1/preview
and would only be accessible through post.
Similarly, :collection => {:archived => :get}
establishes a method for the whole collection, that would be accessed through
comments/archived
精彩评论