# File lib/brakeman/processors/lib/rails2_route_processor.rb, line 182
  def process_connect exp
    return if exp.empty?

    controller = check_for_controller_name exp
    self.current_controller = controller if controller

    #Check for default route
    if string? exp.first
      if exp.first.value == ":controller/:action/:id"
        @tracker.routes[:allow_all_actions] = exp.first
      elsif exp.first.value.include? ":action"
        @tracker.routes[@current_controller] = [:allow_all_actions, exp.line]
        return
      end
    end

    #This -seems- redundant, but people might connect actions
    #to a controller which already allows them all
    return if @tracker.routes[@current_controller].is_a? Array and @tracker.routes[@current_controller][0] == :allow_all_actions

    exp.last.each_with_index do |e,i|
      if symbol? e and e.value == :action
        action = exp.last[i + 1]

        if node_type? action, :lit
          @tracker.routes[@current_controller] << action.value.to_sym
        end

        return
      end
    end
  end