1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
heartcombo--devise/test/rails_app/config/routes.rb

48 lines
1.4 KiB
Ruby
Raw Normal View History

Rails.application.routes.draw do
# Resources for testing
2010-06-29 15:41:34 -04:00
resources :users, :only => [:index] do
get :expire, :on => :member
2010-06-29 15:41:34 -04:00
get :accept, :on => :member
end
resources :admins, :only => [:index]
# Users scope
devise_for :users do
match "/devise_for/sign_in", :to => "devise/sessions#new"
end
as :user do
match "/as/sign_in", :to => "devise/sessions#new"
end
match "/sign_in", :to => "devise/sessions#new"
# Admin scope
devise_for :admin, :path => "admin_area", :controllers => { :sessions => "sessions" }, :skip => :passwords
match "/admin_area/home", :to => "admins#index", :as => :admin_root
match "/anywhere", :to => "foo#bar", :as => :new_admin_password
authenticate(:admin) do
match "/private", :to => "home#private", :as => :private
end
# Other routes for routing_test.rb
namespace :publisher, :path_names => { :sign_in => "i_don_care", :sign_out => "get_out" } do
devise_for :accounts, :class_name => "User", :path_names => { :sign_in => "get_in" }
end
scope ":locale" do
devise_for :accounts, :singular => "manager", :class_name => "User",
:path_names => {
:sign_in => "login", :sign_out => "logout",
:password => "secret", :confirmation => "verification",
:unlock => "unblock", :sign_up => "register",
:registration => "management", :cancel => "giveup"
}
end
2009-10-12 20:49:51 -04:00
match "/set", :to => "home#set"
root :to => "home#index"
end