diff --git a/lib/devise/failure_app.rb b/lib/devise/failure_app.rb index 5f12bc53..aea1fe27 100644 --- a/lib/devise/failure_app.rb +++ b/lib/devise/failure_app.rb @@ -20,7 +20,11 @@ module Devise end def self.default_url_options(*args) - ApplicationController.default_url_options(*args) + if defined?(ApplicationController) + ApplicationController.default_url_options(*args) + else + {} + end end def respond diff --git a/lib/devise/path_checker.rb b/lib/devise/path_checker.rb index d033112a..bfee7bc0 100644 --- a/lib/devise/path_checker.rb +++ b/lib/devise/path_checker.rb @@ -3,7 +3,11 @@ module Devise include Rails.application.routes.url_helpers def self.default_url_options(*args) - ApplicationController.default_url_options(*args) + if defined?(ApplicationController) + ApplicationController.default_url_options(*args) + else + {} + end end def initialize(env, scope)