2010-02-16 08:31:49 -05:00
|
|
|
Rails::Application.routes.draw do
|
2010-02-16 10:11:30 -05:00
|
|
|
resources :users, :only => [:index] do
|
|
|
|
get :expire, :on => :member
|
|
|
|
end
|
|
|
|
|
2010-02-17 07:15:19 -05:00
|
|
|
resources :admins, :only => [:index]
|
|
|
|
|
2010-02-16 08:31:49 -05:00
|
|
|
devise_for :users
|
2010-04-15 02:21:13 -04:00
|
|
|
devise_for :admin, :path => "admin_area", :controllers => { :sessions => "sessions" }, :skip => :passwords
|
|
|
|
devise_for :accounts, :singular => "manager", :path_prefix => ":locale",
|
2010-02-16 11:00:36 -05:00
|
|
|
:class_name => "User", :path_names => {
|
2010-02-17 07:15:19 -05:00
|
|
|
:sign_in => "login", :sign_out => "logout",
|
|
|
|
:password => "secret", :confirmation => "verification",
|
|
|
|
:unlock => "unblock", :sign_up => "register"
|
2010-01-13 13:45:24 -05:00
|
|
|
}
|
2009-10-12 20:49:51 -04:00
|
|
|
|
2010-02-17 07:15:19 -05:00
|
|
|
match "/admin_area/home", :to => "admins#index", :as => :admin_root
|
|
|
|
match "/sign_in", :to => "devise/sessions#new"
|
2009-10-18 13:25:16 -04:00
|
|
|
|
2010-03-12 03:54:57 -05:00
|
|
|
# Dummy route for new admin pasword
|
|
|
|
match "/anywhere", :to => "foo#bar", :as => :new_admin_password
|
|
|
|
|
2010-02-17 07:15:19 -05:00
|
|
|
root :to => "home#index"
|
|
|
|
end
|