RBOnRails-learning/config/routes.rb

25 lines
750 B
Ruby
Raw Normal View History

2024-08-07 14:43:33 +00:00
Rails.application.routes.draw do
2024-08-08 09:19:44 +00:00
get 'sessions/new'
get 'sessions/create'
get 'sessions/destroy'
2024-08-07 14:43:33 +00:00
root "articles#index"
resources :articles do
resources :comments
end
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
# Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
# Can be used by load balancers and uptime monitors to verify that the app is live.
get "up" => "rails/health#show", as: :rails_health_check
2024-08-08 09:19:44 +00:00
resources :users, except: [:new]
get "signup", to: "users#new"
post "signup", to: "users#create"
get "login", to: "sessions#new"
post "login", to: "sessions#create"
delete "logout", to: "sessions#destroy"
2024-08-07 14:43:33 +00:00
end