title: uninitialized constant Controller
body: <p>I have a problem with routes...</p>
  
  <p><strong>routes.rb</strong>   </p>
  
  <pre><code>resources :documents do
  
    resources :user do
       delete 'user_unassign'
    end
  
    resources :attachments do    
      collection do
        get :index_parent_attachments
      end
    end
  
  end
  
  resources :document_types do
     resources :documents
  end
  
  
  
  devise_scope :user do
       #    root :to =&gt; "devise/sessions#new" #, :as =&gt; :root
   end
  
         devise_for :users 
  
   namespace :admin do
     resources :users, :document_types
   end
  </code></pre>
  
  <p>When I click on this link:</p>
  
  <pre><code>&lt;%= link_to 'unfollow', document_user_user_unassign_path(document, user.id), :method =&gt; 'delete' %&gt;
  </code></pre>
  
  <p>it follow this route localhost:3000/documents/1/user/2/user_unassign and i get an error: uninitialized constant UserController</p>
  
  <p><strong>Routes</strong></p>
  
  <pre><code>Prefix Verb   URI Pattern                                                            Controller#Action
                                           root GET    /                                                                      profiles#dashboard
                                      user_root GET    /profiles/dashboard(.:format)                                          profiles#dashboard
                    document_user_user_unassign DELETE /documents/:document_id/user/:user_id/user_unassign(.:format)          user#user_unassign
                            document_user_index GET    /documents/:document_id/user(.:format)                                 user#index
                                                POST   /documents/:document_id/user(.:format)                                 user#create
                              new_document_user GET    /documents/:document_id/user/new(.:format)                             user#new
                             edit_document_user GET    /documents/:document_id/user/:id/edit(.:format)                        user#edit
                                  document_user GET    /documents/:document_id/user/:id(.:format)                             user#show
                                                PATCH  /documents/:document_id/user/:id(.:format)                             user#update
                                                PUT    /documents/:document_id/user/:id(.:format)                             user#update
                                                DELETE /documents/:document_id/user/:id(.:format)                             user#destroy
  index_parent_attachments_document_attachments GET    /documents/:document_id/attachments/index_parent_attachments(.:format) attachments#index_parent_attachments
                           document_attachments GET    /documents/:document_id
  </code></pre>