def accepts?(*types)
      request.accepts.compact.each do |priority|
        # Because IE always sends */* in the accepts header and we assume
        # that if you really wanted XML or something else you would say so
        # explicitly, we will assume */* to only ask for :html
        return types.include?(:html) if priority == Mime::ALL

        return true if types.include?(priority.to_sym)
      end
      false
    end
def accepts?(*types)
      request.accepts.compact.each do |priority|
        # Because IE always sends */* in the accepts header and we assume
        # that if you really wanted XML or something else you would say so
        # explicitly, we will assume */* to only ask for :html
        return types.include?(:html) if priority == Mime::ALL

        return true if types.include?(priority.to_sym)
      end
      false
    end
Returns true if the client accepts one of the MIME types passed to it
 ex: accepts? :html, :xml