Hi
My routes are getting out of hand due to the fact that this isn't possible (correct me if I'm wrong):
map.resources :english_pages, :as => :english, :spanish_pages, :as => :spanish do |article|
Due to nested routes things are spiralling out of control (tidiness).
map.resources :english_pages, :as => :english, :member => {:manage => :get} do |article|
article.resources :topics do |topic|
topic.resources :posts
end
end
map.resources :spanish_pages, :as => :spanish do |article|
article.resources :topics do |topic|
topic.resources :posts
end
end
How can I avoid duplication of this:
article.resources :topics do |topic|
topic.resources :posts
end
Is there some way to store routes as a block somewhere, or perhaps define, in my case, english_pages and spanish pages aliases seperately?
Thanks very much in advance.