mardi 25 mars 2014

uninitialized constant Controller


Vote count:

0




I have a problem with routes...


routes.rb



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 => "devise/sessions#new" #, :as => :root
end

devise_for :users

namespace :admin do
resources :users, :document_types
end


When I click on this link:



<%= link_to 'unfollow', document_user_user_unassign_path(document, user.id), :method => 'delete' %>


it follow this route localhost:3000/documents/1/user/2/user_unassign and i get an error: uninitialized constant UserController



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire