app/models/workgroup.rb
def default_transport_mode
    transport_mode =
      if transport_modes.keys.include?(DEFAULT_TRANSPORT_MODE)
        DEFAULT_TRANSPORT_MODE
      else
        sorted_transport_modes.first
      end

    transport_submode =
      if transport_modes[transport_mode].include?("undefined")
        "undefined"
      else
        transport_modes[transport_mode].first
      end

    [ transport_mode, transport_submode ]
  end
# Returns [ "bus", "undefined" ] when the Workgroup accepts this transport mode.
# else returns first transport mode with its first submode
Returns [ "bus", "undefined" ] when the Workgroup accepts this transport mode.
else returns first transport mode with its first submode
Returns [ " bus " " undefined " ] when the Workgroup accepts this transport mode . else returns first transport mode with its first submode
def default_transport_mode
    transport_mode =
      if transport_modes.keys.include?(DEFAULT_TRANSPORT_MODE)
        DEFAULT_TRANSPORT_MODE
      else
        sorted_transport_modes.first
      end
    transport_submode =
      if transport_modes[transport_mode].include?("undefined")
        "undefined"
      else
        transport_modes[transport_mode].first
      end
    [ transport_mode, transport_submode ]
  end
def default_transport_mode transport_mode = if transport_modes . keys . include? ( DEFAULT_TRANSPORT_MODE ) DEFAULT_TRANSPORT_MODE else sorted_transport_modes . first end transport_submode = if transport_modes [ transport_mode ] . include? ( "undefined" ) "undefined" else transport_modes [ transport_mode ] . first end [ transport_mode , transport_submode ] end
Returns [ "bus", "undefined" ] when the Workgroup accepts this transport mode.
Returns [ " bus " " undefined " ] when the Workgroup accepts this transport mode .