Compare commits

...

3 Commits

Author SHA1 Message Date
José Valim
8fc18b49eb Release 2.0.4 2012-02-17 12:49:21 +01:00
José Valim
b4af49cc38 Update CHANGELOG. 2012-02-17 12:49:14 +01:00
José Valim
4c654e71be Fix regression where warden was being configured too early. 2012-02-17 12:49:07 +01:00
4 changed files with 14 additions and 13 deletions

View File

@@ -1,4 +1,11 @@
== 2.0.3
== 2.0.4
Notes: https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0
* bug fix
* Fix a regression that caused Warden to be initialized too late
== 2.0.3 (yanked)
* bug fix
* Ensure warning is not shown by mistake on apps with mounted engines
@@ -8,8 +15,6 @@
== 2.0.2
Notes: https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0
* enhancements
* Add devise_i18n_options to customize I18n message
@@ -114,7 +119,7 @@ Notes: https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.
* bug fix
* Fix backward incompatible change from 1.4.6 for those using custom controllers
== 1.4.6
== 1.4.6 (yanked)
* enhancements
* Allow devise_for :skip => :all

View File

@@ -87,8 +87,6 @@ module Devise
end
config.after_initialize do
Devise.configure_warden!
example = <<-YAML
en:
devise:

View File

@@ -7,11 +7,8 @@ module ActionDispatch::Routing
def finalize_with_devise!
result = finalize_without_devise!
# If @devise_finalized was defined, it means devise_for was invoked
# in this router, so we proceed to generate devise helpers unless
# they were already defined (which then @devise_finalizd would be true).
if defined?(@devise_finalized) && !@devise_finalized
if Devise.router_name.nil? && self != Rails.application.try(:routes)
@devise_finalized ||= begin
if Devise.router_name.nil? && defined?(@devise_finalized) && self != Rails.application.try(:routes)
warn "[DEVISE] We have detected that you are using devise_for inside engine routes. " \
"In this case, you probably want to set Devise.router_name = MOUNT_POINT, where " \
"MOUNT_POINT is a symbol representing where this engine will be mounted at. For " \
@@ -19,8 +16,9 @@ module ActionDispatch::Routing
" to :main_app as well in case you want to keep the current behavior."
end
Devise.configure_warden!
Devise.regenerate_helpers!
@devise_finalized = true
true
end
result

View File

@@ -1,3 +1,3 @@
module Devise
VERSION = "2.0.3".freeze
VERSION = "2.0.4".freeze
end