1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Only proxy to application controller if it exists.

This commit is contained in:
José Valim 2012-01-02 20:00:38 +01:00
parent fd0e929087
commit 1152fda687
2 changed files with 10 additions and 2 deletions

View file

@ -20,7 +20,11 @@ module Devise
end end
def self.default_url_options(*args) def self.default_url_options(*args)
if defined?(ApplicationController)
ApplicationController.default_url_options(*args) ApplicationController.default_url_options(*args)
else
{}
end
end end
def respond def respond

View file

@ -3,7 +3,11 @@ module Devise
include Rails.application.routes.url_helpers include Rails.application.routes.url_helpers
def self.default_url_options(*args) def self.default_url_options(*args)
if defined?(ApplicationController)
ApplicationController.default_url_options(*args) ApplicationController.default_url_options(*args)
else
{}
end
end end
def initialize(env, scope) def initialize(env, scope)