mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Allow controllers to be given as symbols.
This commit is contained in:
parent
4a3ad7f348
commit
b1a27ad633
2 changed files with 2 additions and 1 deletions
|
@ -58,6 +58,7 @@ module Devise
|
|||
mod = options[:module] || "devise"
|
||||
@controllers = Hash.new { |h,k| h[k] = "#{mod}/#{k}" }
|
||||
@controllers.merge!(options[:controllers] || {})
|
||||
@controllers.each { |k,v| @controllers[k] = v.to_s }
|
||||
|
||||
@path_names = Hash.new { |h,k| h[k] = k.to_s }
|
||||
@path_names.merge!(:registration => "")
|
||||
|
|
|
@ -19,7 +19,7 @@ Rails.application.routes.draw do
|
|||
match "/sign_in", :to => "devise/sessions#new"
|
||||
|
||||
# Admin scope
|
||||
devise_for :admin, :path => "admin_area", :controllers => { :sessions => "admins/sessions" }, :skip => :passwords
|
||||
devise_for :admin, :path => "admin_area", :controllers => { :sessions => :"admins/sessions" }, :skip => :passwords
|
||||
|
||||
match "/admin_area/home", :to => "admins#index", :as => :admin_root
|
||||
match "/anywhere", :to => "foo#bar", :as => :new_admin_password
|
||||
|
|
Loading…
Reference in a new issue