Should accept path prefixes not starting with slash.
This commit is contained in:
parent
ef25da992c
commit
04ce9d1e6f
|
@ -6,6 +6,9 @@
|
||||||
* Warden 0.9.0 compatibility
|
* Warden 0.9.0 compatibility
|
||||||
* Mongomapper 0.6.10 compatibility
|
* Mongomapper 0.6.10 compatibility
|
||||||
|
|
||||||
|
* bug fix
|
||||||
|
* Accept path prefix not starting with slash
|
||||||
|
|
||||||
== 0.8.2
|
== 0.8.2
|
||||||
|
|
||||||
* enhancements
|
* enhancements
|
||||||
|
|
|
@ -62,8 +62,7 @@ module Devise
|
||||||
@klass = (options.delete(:class_name) || name.to_s.classify).to_s
|
@klass = (options.delete(:class_name) || name.to_s.classify).to_s
|
||||||
@name = (options.delete(:scope) || name.to_s.singularize).to_sym
|
@name = (options.delete(:scope) || name.to_s.singularize).to_sym
|
||||||
@path_names = options.delete(:path_names) || {}
|
@path_names = options.delete(:path_names) || {}
|
||||||
@path_prefix = options.delete(:path_prefix).to_s
|
@path_prefix = "/#{options.delete(:path_prefix)}/".squeeze("/")
|
||||||
@path_prefix << "/" unless @path_prefix[-1] == ?/
|
|
||||||
@route_options = options || {}
|
@route_options = options || {}
|
||||||
|
|
||||||
setup_path_names
|
setup_path_names
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
ActionController::Routing::Routes.draw do |map|
|
ActionController::Routing::Routes.draw do |map|
|
||||||
map.devise_for :users
|
map.devise_for :users
|
||||||
map.devise_for :admin, :as => 'admin_area'
|
map.devise_for :admin, :as => 'admin_area'
|
||||||
map.devise_for :accounts, :scope => 'manager', :path_prefix => '/:locale',
|
map.devise_for :accounts, :scope => 'manager', :path_prefix => ':locale',
|
||||||
:class_name => "User", :requirements => { :extra => 'value' }, :path_names => {
|
:class_name => "User", :requirements => { :extra => 'value' }, :path_names => {
|
||||||
:sign_in => 'login', :sign_out => 'logout', :password => 'secret',
|
:sign_in => 'login', :sign_out => 'logout', :password => 'secret',
|
||||||
:confirmation => 'verification', :unlock => 'unblock'
|
:confirmation => 'verification', :unlock => 'unblock'
|
||||||
|
|
Loading…
Reference in New Issue