Skip to content
Browse files

Return nil for Mime::NullType#ref

  • Loading branch information...
1 parent d50df2f commit 24b1d4fc63dc40c6996031a795998a332128c0de @pixeltrix pixeltrix committed
View
2 actionpack/lib/action_controller/metal/rendering.rb
@@ -6,7 +6,7 @@ module Rendering
# Before processing, set the request formats in current controller formats.
def process_action(*) #:nodoc:
- self.formats = request.formats.select { |x| !x.nil? }.map(&:ref)
+ self.formats = request.formats.map(&:ref).compact
super
end
View
4 actionpack/lib/action_dispatch/http/mime_type.rb
@@ -312,6 +312,10 @@ def nil?
true
end
+ def ref
+ nil
+ end
+
def respond_to_missing?(method, include_private = false)
method.to_s.ends_with? '?'
end

0 comments on commit 24b1d4f

Please sign in to comment.
Something went wrong with that request. Please try again.