2021-12-18 10:31:37 +01:00
|
|
|
Rails.application.routes.draw do
|
2021-12-19 04:13:05 +01:00
|
|
|
get 'users/new'
|
|
|
|
get 'users/show'
|
2021-12-18 11:21:51 +01:00
|
|
|
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]
|
|
|
|
|
|
|
|
get '/' => 'suppliers#index', :as => :root
|
|
|
|
|
|
|
|
resources :suppliers do
|
|
|
|
resources :articles do # name_prefix => nil
|
|
|
|
collection do
|
|
|
|
delete :destroy_all
|
|
|
|
get :upload
|
|
|
|
post :parse
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2021-12-19 04:13:05 +01:00
|
|
|
resources :users
|
|
|
|
|
2021-12-18 11:21:51 +01:00
|
|
|
match '/:controller(/:action(/:id))', :via => [:get, :post]
|
2021-12-19 04:13:05 +01:00
|
|
|
match '/users', to: 'users#index', via: 'get'
|
|
|
|
match '/users/:id', to: 'users#show', via: 'get'
|
2021-12-18 10:31:37 +01:00
|
|
|
end
|