Permalink
Browse files

Pass strings to demodulize method

Goes along with fea1cdc and
59ec456.
  • Loading branch information...
1 parent 8d8ea78 commit c20fe91b0562987f5d9e57caee0bdbb6c9ef3220 @carlosantoniodasilva carlosantoniodasilva committed Feb 27, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 activemodel/lib/active_model/conversion.rb
@@ -83,7 +83,7 @@ module ClassMethods #:nodoc:
# 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

0 comments on commit c20fe91

Please sign in to comment.