module ActionDispatch::Http::MimeNegotiation
def negotiate_mime(order)
def negotiate_mime(order) formats.each do |priority| if priority == Mime::ALL return order.first elsif order.include?(priority) return priority end end order.include?(Mime::ALL) ? format : nil end