Permalink
Browse files

Avoid false positives for warning message.

  • Loading branch information...
1 parent d2223ee commit 93cf836564d368460d0f49b5c9051b805ba8ecc5 @josevalim josevalim committed Feb 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/devise/rails/routes.rb
@@ -8,7 +8,7 @@ def finalize_with_devise!
finalize_without_devise!
@devise_finalized ||= begin
- if Devise.router_name.nil? && self != Rails.application.try(:routes)
+ if Devise.router_name.nil? && Rails.application && self != Rails.application.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 " \

0 comments on commit 93cf836

Please sign in to comment.