Polymorphic resources

I've posted a patch for #9932 ticket to allow polymorphic routes to
resources and nested resources:

map.resources :posts, :polymorphic => [:events, :articles] do |posts|
  posts.resources :assets, :polymorphic => [:images, :movies]
end

# In view
edit_post_asset_path(:post_type => 'events', :post_id =>
1, :asset_type => 'movies', :id => 2)

=> "/events/1/movies/2/edit"

Please spend a bit of time to take a look at this ticket
http://dev.rubyonrails.org/ticket/9932#comment:3 if it makes sense.