On 07/19/2011 04:17 PM, Chris Berkhout wrote:

CB::Application.routes.draw do
  root :to =>  'documents#index'
  resources :tags
  resources :sources
  resources :people
  resources :documents, :except =>  :index
end

Which produces the expected routes:
https://gist.github.com/5d1b377e99c63016fd22

The problem is that I expected the "documents_path" helper to return
"/" (the first matching route), but it still goes to "/documents".


This should do it:

  resources :documents, :only => [:index], :path => ''
  resources :documents, :except => [:index]



- Andrew

--
You received this message because you are subscribed to the Google Groups "Ruby or 
Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to