Refactored login module. Implemented standard sessions controller.
This commit is contained in:
parent
b1a700ab5d
commit
e40f865c45
13 changed files with 89 additions and 332 deletions
|
|
@ -1,20 +1,29 @@
|
|||
Foodsoft::Application.routes.draw do
|
||||
|
||||
get "sessions/new"
|
||||
|
||||
# Use routing filter to select foodcoop config and datbase
|
||||
# filter :foodcoop
|
||||
|
||||
root :to => redirect("/#{Foodsoft.env}")
|
||||
|
||||
scope '/:foodcoop', :defaults => { :foodcoop => Foodsoft.env } do
|
||||
|
||||
# Root path
|
||||
root :to => 'home#index'
|
||||
|
||||
########### Sessions
|
||||
|
||||
match '/login' => 'sessions#new', :as => 'login'
|
||||
match '/logout' => 'sessions#destroy', :as => 'logout'
|
||||
resources :sessions, :only => [:new, :create, :destroy]
|
||||
|
||||
########### User specific
|
||||
|
||||
match '/login' => 'login#index', :as => 'login'
|
||||
match '/logout' => 'login#logout', :as => 'logout'
|
||||
match '/home/profile' => 'home#profile', :as => 'my_profile'
|
||||
match '/home/ordergroup' => 'home#ordergroup', :as => 'my_ordergroup'
|
||||
|
||||
|
||||
############ Wiki
|
||||
|
||||
resources :pages do
|
||||
|
|
@ -141,5 +150,10 @@ Foodsoft::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
############## The rest
|
||||
|
||||
match '/:controller(/:action(/:id))'
|
||||
|
||||
end # End of /:foodcoop scope
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue