Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

pass the class name to `tableize`

We should not rely on to_s to return the name of the class
  • Loading branch information...
commit fea1cdcff4d50d302d8e8532432c3ab107ff816d 1 parent 982091e
@tenderlove tenderlove authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activemodel/lib/active_model/conversion.rb
View
2  activemodel/lib/active_model/conversion.rb
@@ -84,7 +84,7 @@ module ClassMethods #:nodoc:
def _to_partial_path #:nodoc:
@_to_partial_path ||= begin
element = ActiveSupport::Inflector.underscore(ActiveSupport::Inflector.demodulize(self))
- collection = ActiveSupport::Inflector.tableize(self)
+ collection = ActiveSupport::Inflector.tableize(name)
"#{collection}/#{element}".freeze
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.