diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 2 | ||||
-rw-r--r-- | config/routes.rb | 72 |
2 files changed, 42 insertions, 32 deletions
diff --git a/config/application.rb b/config/application.rb index bf581b8..57c9163 100644 --- a/config/application.rb +++ b/config/application.rb @@ -12,6 +12,8 @@ module Leaguer # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. + I18n.enforce_available_locales = true + # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' diff --git a/config/routes.rb b/config/routes.rb index 7d898b8..a4f1f66 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,12 @@ Leaguer::Application.routes.draw do + + #creates sessions as a resource but limits it to these actions + resources :sessions, only: [:new, :create, :destroy] + + match 'signup', to: 'users#new', via: 'get' + match 'signin', to: 'sessions#new', via: 'get' + match 'signout', to: 'sessions#destroy', via: 'delete' + resources :pms resources :alerts @@ -24,51 +32,51 @@ Leaguer::Application.routes.draw do # root 'welcome#index' # Example of regular route: - # get 'products/:id' => 'catalog#view' + # get 'products/:id' => 'catalog#view' # Example of named route that can be invoked with purchase_url(id: product.id) - # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase + # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase # Example resource route (maps HTTP verbs to controller actions automatically): - # resources :products + # resources :products # Example resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end + # resources :products do + # member do + # get 'short' + # post 'toggle' + # end # - # collection do - # get 'sold' - # end - # end + # collection do + # get 'sold' + # end + # end # Example resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end + # resources :products do + # resources :comments, :sales + # resource :seller + # end # Example resource route with more complex sub-resources: - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', on: :collection - # end - # end + # resources :products do + # resources :comments + # resources :sales do + # get 'recent', on: :collection + # end + # end # Example resource route with concerns: - # concern :toggleable do - # post 'toggle' - # end - # resources :posts, concerns: :toggleable - # resources :photos, concerns: :toggleable + # concern :toggleable do + # post 'toggle' + # end + # resources :posts, concerns: :toggleable + # resources :photos, concerns: :toggleable # Example resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end + # namespace :admin do + # # Directs /admin/products/* to Admin::ProductsController + # # (app/controllers/admin/products_controller.rb) + # resources :products + # end end |