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

use reference if available otherwise ref

This commit is contained in:
Jack Dempsey 2011-03-25 03:07:53 +08:00 committed by José Valim
parent fe9024218c
commit 330cafd3d2

View file

@ -243,7 +243,9 @@ module Devise
# Set the mailer reference object to access the mailer.
def self.mailer=(class_name)
@@mailer_ref = ActiveSupport::Dependencies.reference(class_name)
@@mailer_ref = ActiveSupport::Dependencies.respond_to?(:reference)
? ActiveSupport::Dependencies.reference(class_name)
: ActiveSupport::Dependencies.ref(class_name)
end
self.mailer = "Devise::Mailer"