Allow controllers to be given as symbols.
This commit is contained in:
parent
4a3ad7f348
commit
b1a27ad633
|
@ -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 New Issue