    # File lib/action_controller/request.rb, line 154
        def format
          @format ||=
            if parameters[:format]
              Mime::Type.lookup_by_extension(parameters[:format])
            elsif ActionController::Base.use_accept_header
              accepts.first
            elsif xhr?
              Mime::Type.lookup_by_extension("js")
            else
              Mime::Type.lookup_by_extension("html")
            end
        end