ActiveSupport::Deprecation.warn"ActiveModel-compatible objects whose classes return a #model_name that responds to #partial_path are deprecated. Please respond to #to_partial_path directly instead."
klass.model_name.partial_path
else
raiseArgumentError.new("'#{object.inspect}' is not an ActiveModel-compatible object that returns a valid partial path.")
end
raiseArgumentError.new("'#{object.inspect}' is not an ActiveModel-compatible object. It must implement :to_partial_path.")