refactored routes file:
now using namespaces to make the file more readable and better structured
This commit is contained in:
parent
6bc24a48f0
commit
ae6a202e59
@ -2,24 +2,36 @@ Rails.application.routes.draw do
|
|||||||
|
|
||||||
devise_for :users, path_names: {sign_in: 'log_in', sign_out: 'log out'}
|
devise_for :users, path_names: {sign_in: 'log_in', sign_out: 'log out'}
|
||||||
|
|
||||||
get 'login/index'
|
namespace :login do
|
||||||
|
get 'index'
|
||||||
|
end
|
||||||
|
|
||||||
get 'tiss_crawler/search'
|
namespace :tiss_crawler do
|
||||||
|
get 'search'
|
||||||
|
end
|
||||||
|
|
||||||
get 'people_crawler/show_basic'
|
namespace :people_crawler do
|
||||||
get 'people_crawler/show_detail'
|
get 'show_basic'
|
||||||
post 'people_crawler/show_detail'
|
get 'show_detail'
|
||||||
get 'people_crawler/add_to_fav'
|
post 'show_detail'
|
||||||
post 'people_crawler/add_to_fav'
|
get 'add_to_fav'
|
||||||
|
post 'add_to_fav'
|
||||||
|
end
|
||||||
|
|
||||||
get 'courses_crawler/show_basic'
|
namespace :courses_crawler do
|
||||||
get 'courses_crawler/show_detail'
|
get 'show_basic'
|
||||||
post 'courses_crawler/show_detail'
|
get 'show_detail'
|
||||||
get 'courses_crawler/add_to_fav'
|
post 'show_detail'
|
||||||
post 'courses_crawler/add_to_fav'
|
get 'add_to_fav'
|
||||||
|
post 'add_to_fav'
|
||||||
|
end
|
||||||
|
|
||||||
namespace :favorites do
|
namespace :favorites do
|
||||||
get 'favorite_person/index'
|
get 'index'
|
||||||
|
get 'people'
|
||||||
|
get 'courses'
|
||||||
|
get 'theses'
|
||||||
|
get 'projects'
|
||||||
end
|
end
|
||||||
|
|
||||||
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
|
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user