Skip to content

Commit

Permalink
use reference if available otherwise ref
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdempsey authored and josevalim committed Mar 24, 2011
1 parent fe90242 commit 330cafd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/devise.rb
Expand Up @@ -243,7 +243,9 @@ def self.mailer

# 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"

Expand Down

0 comments on commit 330cafd

Please sign in to comment.