sharedlists/config/routes.rb

25 lines
676 B
Ruby

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