2009-10-07 20:46:40 -04:00
|
|
|
ActionController::Routing::Routes.draw do |map|
|
2009-10-12 20:49:51 -04:00
|
|
|
map.devise_for :users
|
|
|
|
map.devise_for :admin, :as => 'admin_area'
|
2010-01-13 13:45:24 -05:00
|
|
|
map.devise_for :accounts, :scope => 'manager', :path_prefix => '/:locale',
|
|
|
|
:class_name => "User", :requirements => { :extra => 'value' }, :path_names => {
|
|
|
|
:sign_in => 'login', :sign_out => 'logout', :password => 'secret',
|
|
|
|
:confirmation => 'verification', :unlock => 'unblock'
|
|
|
|
}
|
2009-10-12 20:49:51 -04:00
|
|
|
|
2009-11-24 08:52:13 -05:00
|
|
|
map.resources :users, :only => [:index], :member => { :expire => :get }
|
2009-10-10 17:07:25 -04:00
|
|
|
map.resources :admins, :only => :index
|
2009-10-07 20:46:40 -04:00
|
|
|
map.root :controller => :home
|
2009-10-11 07:15:48 -04:00
|
|
|
|
2009-10-12 20:49:51 -04:00
|
|
|
map.connect '/admin_area/password/new', :controller => "passwords", :action => "new"
|
2009-10-18 22:38:50 -04:00
|
|
|
map.admin_root '/admin_area/home', :controller => "admins", :action => "index"
|
2009-10-18 13:25:16 -04:00
|
|
|
|
2010-01-06 08:31:00 -05:00
|
|
|
map.connect '/sign_in', :controller => "sessions", :action => "new"
|
2009-10-11 07:15:48 -04:00
|
|
|
map.connect ':controller/:action/:id'
|
|
|
|
map.connect ':controller/:action/:id.:format'
|
2009-10-07 20:46:40 -04:00
|
|
|
end
|