проект, который я предпринимаю, должен иметь user
, поэтому у каждого пользователя есть свои задачи, но проблема в том, что текущий логин user_id
появляется в URL.Есть ли способ, которым я могу скрыть user_id
на URL все время.Я использую devise gem
.
Routes.rb
devise_for :users, :path => 'accounts'
resources :users do
resources :tasks, only: [:index, :create, :edit]do
collection do
get :board
end
end
end
Маршруты:
homes_index GET /homes/index(.:format) homes#index
new_user_session GET /accounts/sign_in(.:format) devise/sessions#new
user_session POST /accounts/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /accounts/sign_out(.:format) devise/sessions#destroy
new_user_password GET /accounts/password/new(.:format) devise/passwords#new
edit_user_password GET /accounts/password/edit(.:format) devise/passwords#edit
user_password PATCH /accounts/password(.:format) devise/passwords#update
PUT /accounts/password(.:format) devise/passwords#update
POST /accounts/password(.:format) devise/passwords#create
cancel_user_registration GET /accounts/cancel(.:format) devise/registrations#cancel
new_user_registration GET /accounts/sign_up(.:format) devise/registrations#new
edit_user_registration GET /accounts/edit(.:format) devise/registrations#edit
user_registration PATCH /accounts(.:format) devise/registrations#update
PUT /accounts(.:format) devise/registrations#update
DELETE /accounts(.:format) devise/registrations#destroy
POST /accounts(.:format) devise/registrations#create
root GET / homes#index
message_message_clear GET /messages/:message_id/message/clear(.:format) message#clear
messages POST /messages(.:format) messages#create
new_message GET /messages/new(.:format) messages#new
user_tasks GET /users/:user_id/tasks(.:format) tasks#index
POST /users/:user_id/tasks(.:format) tasks#create
edit_user_task GET /users/:user_id/tasks/:id/edit(.:format) tasks#edit
users GET /users(.:format) users#index
POST /users(.:format) users#create
new_user GET /users/new(.:format) users#new
edit_user GET /users/:id/edit(.:format) users#edit
user GET /users/:id(.:format) users#show
PATCH /users/:id(.:format) users#update
PUT /users/:id(.:format) users#update
DELETE /users/:id(.:format) users#destroy
Еслитребуется дополнительная информация, пожалуйста, дайте мне знать.