提交 c20fe91b 编写于 作者: C Carlos Antonio da Silva

Pass strings to demodulize method

Goes along with fea1cdcf and
59ec4562.
上级 8d8ea78a
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册