mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Return nil for Mime::NullType#ref
This commit is contained in:
parent
d50df2f116
commit
24b1d4fc63
2 changed files with 5 additions and 1 deletions
|
@ -6,7 +6,7 @@ module ActionController
|
|||
|
||||
# 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
|
||||
|
||||
|
|
|
@ -312,6 +312,10 @@ module Mime
|
|||
true
|
||||
end
|
||||
|
||||
def ref
|
||||
nil
|
||||
end
|
||||
|
||||
def respond_to_missing?(method, include_private = false)
|
||||
method.to_s.ends_with? '?'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue