2010-02-16 08:31:49 -05:00
|
|
|
Rails::Application.routes.draw do
|
2010-06-29 15:41:34 -04:00
|
|
|
resources :users, :only => [:index] do
|
2010-02-16 10:11:30 -05:00
|
|
|
get :expire, :on => :member
|
2010-06-29 15:41:34 -04:00
|
|
|
get :accept, :on => :member
|
2010-02-16 10:11:30 -05:00
|
|
|
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
|
2010-06-24 10:51:30 -04:00
|
|
|
devise_for :accounts, :singular => "manager", :path_prefix => ":locale", :class_name => "User",
|
|
|
|
:path_names => {
|
2010-02-17 07:15:19 -05:00
|
|
|
:sign_in => "login", :sign_out => "logout",
|
|
|
|
:password => "secret", :confirmation => "verification",
|
2010-05-16 06:14:02 -04:00
|
|
|
:unlock => "unblock", :sign_up => "register",
|
|
|
|
:registration => "management"
|
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"
|
2010-05-24 17:02:54 -04:00
|
|
|
|
|
|
|
authenticate(:admin) do
|
|
|
|
match "/private", :to => "home#private", :as => :private
|
|
|
|
end
|
2010-02-17 07:15:19 -05:00
|
|
|
end
|