simplify routes

new_user
JuliusR 12 months ago
parent 2470b514c2
commit b319b9de93
  1. 6
      config/routes.rb

@ -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

Loading…
Cancel
Save