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

Fix syntax error.

This commit is contained in:
José Valim 2011-03-24 20:25:54 +01:00
parent 330cafd3d2
commit 30b35e3727
2 changed files with 8 additions and 4 deletions

View file

@ -226,6 +226,12 @@ module Devise
yield self
end
def self.ref(arg)
dependencies = ActiveSupport::Dependencies
dependencies.respond_to?(:reference) ?
dependencies.reference(arg) : dependencies.ref(arg)
end
def self.omniauth_providers
omniauth_configs.keys
end
@ -243,9 +249,7 @@ module Devise
# Set the mailer reference object to access the mailer.
def self.mailer=(class_name)
@@mailer_ref = ActiveSupport::Dependencies.respond_to?(:reference)
? ActiveSupport::Dependencies.reference(class_name)
: ActiveSupport::Dependencies.ref(class_name)
@@mailer_ref = ref(class_name)
end
self.mailer = "Devise::Mailer"

View file

@ -50,7 +50,7 @@ module Devise
@singular = (options[:singular] || @scoped_path.tr('/', '_').singularize).to_sym
@class_name = (options[:class_name] || name.to_s.classify).to_s
@ref = ActiveSupport::Dependencies.ref(@class_name)
@ref = Devise.ref(@class_name)
@path = (options[:path] || name).to_s
@path_prefix = options[:path_prefix]