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:
parent
fd0e929087
commit
1152fda687
2 changed files with 10 additions and 2 deletions
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue