From 307fe6cb60a4863561beb61c247844056dc94b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 2 Mar 2011 10:13:12 +0100 Subject: [PATCH] Revert two previous commits. Rails is broken, it needs to be fixed instead. --- lib/devise/mapping.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/devise/mapping.rb b/lib/devise/mapping.rb index ac8400de..8a1d25ff 100644 --- a/lib/devise/mapping.rb +++ b/lib/devise/mapping.rb @@ -50,6 +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) @path = (options[:path] || name).to_s @path_prefix = options[:path_prefix] @@ -72,7 +73,7 @@ module Devise # Gives the class the mapping points to. def to - ActiveSupport::Inflector.constantize(@class_name) + @ref.get end def strategies