aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2014-02-26 21:20:33 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2014-02-26 21:20:56 -0300
commitc20fe91b0562987f5d9e57caee0bdbb6c9ef3220 (patch)
tree1bf5d999e3d8095f391fbac6908bb02657c39998 /activemodel/lib
parent8d8ea78a89d56be0eaec6badb79c8f5674f22439 (diff)
downloadrails-c20fe91b0562987f5d9e57caee0bdbb6c9ef3220.tar.gz
rails-c20fe91b0562987f5d9e57caee0bdbb6c9ef3220.tar.bz2
rails-c20fe91b0562987f5d9e57caee0bdbb6c9ef3220.zip
Pass strings to demodulize method
Goes along with fea1cdcff4d50d302d8e8532432c3ab107ff816d and 59ec4562a2e70df455b2e44a67c340fa5254e26e.
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/conversion.rb2
1 files changed, 1 insertions, 1 deletions
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