simplify routes

This commit is contained in:
JuliusR 2021-12-19 10:46:47 +01:00 committed by 1resu
parent dd6d35e3bd
commit d705402d8b

View file

@ -1,6 +1,4 @@
Rails.application.routes.draw do
get 'users/new'
get 'users/show'
get 'log_in' => 'sessions#new', :as => :log_in
match 'log_out' => 'sessions#destroy', :as => :log_out, :via => [:get, :post]
resources :sessions, :only => [:new, :create, :destroy]
@ -18,8 +16,4 @@ Rails.application.routes.draw do
end
resources :users
match '/:controller(/:action(/:id))', :via => [:get, :post]
match '/users', to: 'users#index', via: 'get'
match '/users/:id', to: 'users#show', via: 'get'
end