Fix broken setup path names and use path names in warden

This commit is contained in:
Carlos A. da Silva 2009-10-17 13:06:51 -03:00
parent 4fd5d0913e
commit bc825d3b23
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ Warden::Strategies.add(:authenticable) do
success!(resource)
else
store_location
redirect!("/#{@mapping.as}/sign_in", :unauthenticated => true)
redirect!("/#{@mapping.as}/#{@mapping.path_names[:sign_in]}", :unauthenticated => true)
end
end

View File

@ -17,7 +17,7 @@ module Devise
@klass = (options[:class_name] || name.to_s.classify).to_s
@name = (options[:singular] || name.to_s.singularize).to_sym
@path_names = options[:path_names] || {}
setup_path_names
end
# Return modules for the mapping.