From c20fe91b0562987f5d9e57caee0bdbb6c9ef3220 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 26 Feb 2014 21:20:33 -0300 Subject: Pass strings to demodulize method Goes along with fea1cdcff4d50d302d8e8532432c3ab107ff816d and 59ec4562a2e70df455b2e44a67c340fa5254e26e. --- activemodel/lib/active_model/conversion.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel/lib/active_model/conversion.rb') diff --git a/activemodel/lib/active_model/conversion.rb b/activemodel/lib/active_model/conversion.rb index 06fe0720ef..374265f0d8 100644 --- a/activemodel/lib/active_model/conversion.rb +++ b/activemodel/lib/active_model/conversion.rb @@ -83,7 +83,7 @@ module ActiveModel # internal method and should not be accessed directly. def _to_partial_path #:nodoc: @_to_partial_path ||= begin - element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(self)) + element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(name)) collection = ActiveSupport::Inflector.tableize(name) "#{collection}/#{element}".freeze end -- cgit v1.2.3