This method is deprecated or moved on the latest stable version.
The last existing version (v6.0.0) is shown here.
partial_path(object, view)
private
Obtains the path to where the object’s partial is located. If the object
responds to to_partial_path, then to_partial_path will be
called and will provide the path. If the object does not respond to
to_partial_path, then an ArgumentError is raised.
If prefix_partial_path_with_controller_namespace is true, then
this method will prefix the partial paths with a namespace.
# File actionview/lib/action_view/renderer/partial_renderer.rb, line 488
def partial_path(object, view)
object = object.to_model if object.respond_to?(:to_model)
path = if object.respond_to?(:to_partial_path)
object.to_partial_path
else
raise ArgumentError.new("'#{object.inspect}' is not an ActiveModel-compatible object. It must implement :to_partial_path.")
end
if view.prefix_partial_path_with_controller_namespace
prefixed_partial_names[path] ||= merge_prefix_into_object_path(@context_prefix, path.dup)
else
path
end
end