On 7/31/06, Josh Susser <[EMAIL PROTECTED]> wrote:
Here's a patch that changes map.resources to use the "flipped" hashes
for optional actions. Tests pass for new arrangement. Looks like
postback actions seem to work again too, though the
#filtered_named_routes method in your routing_navigator only shows
one of the routes with the same name (but different :method
conditions). Not sure if that is going to cause a problem in the
route code somewhere.
map.resources :comments, :member => { :get => :reply, :post =>
[:reply, :spawn, :split] }
We discussed this some more and decided against it. Having postbacks
goes against what simply_restful is doing. Keep in mind, nothing
simply_restful does is impossible to do with routing. The resources
macro is designed to reward those using conventions. If you do need
to a reply action on both get and post, you can try this:
map.connect '/comments/:id;reply', :conditions => { :method => :post }
map.resources :comments, :member => { :reply => :get }
--
Rick Olson
http://techno-weenie.net
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core