diff options
Diffstat (limited to 'actionpack/lib/action_view/renderer/partial_renderer.rb')
-rw-r--r-- | actionpack/lib/action_view/renderer/partial_renderer.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/renderer/partial_renderer.rb b/actionpack/lib/action_view/renderer/partial_renderer.rb index 374bdb62f5..e231aade01 100644 --- a/actionpack/lib/action_view/renderer/partial_renderer.rb +++ b/actionpack/lib/action_view/renderer/partial_renderer.rb @@ -300,7 +300,6 @@ module ActionView "and is followed by any combinations of letters, numbers, or underscores.") end - extract_format(@path, @details) self end @@ -369,13 +368,7 @@ module ActionView path = if object.respond_to?(:to_partial_path) object.to_partial_path else - klass = object.class - if klass.respond_to?(:model_name) - 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 - raise ArgumentError.new("'#{object.inspect}' is not an ActiveModel-compatible object that returns a valid partial path.") - end + raise ArgumentError.new("'#{object.inspect}' is not an ActiveModel-compatible object. It must implement :to_partial_path.") end @partial_names[path] ||= merge_prefix_into_object_path(@context_prefix, path.dup) |