module ApplicationHelper
  # render bidder group name from award
  def render_bidder_group award
    if award.is_ute?
      str = 'UTE: '
      award.get_ute_groups().each_with_index do |group, i|
        str += i==0 ? '' : ' - '
        str += link_to group[:name], bidder_path(group[:slug])
      end
      return str.html_safe
    else
      return link_to award.bidder.group, bidder_path(award.bidder) unless award.bidder.group.blank?
    end
  end
end

module ApplicationHelper
  # render bidder group name from award
  def render_bidder_group award
    if award.is_ute?
      str = award.get_ute_groups().length > 1 ? 'UTE: ' : ''
      award.get_ute_groups().each_with_index do |group, i|
        str += i==0 ? '' : ' - '
        str += link_to group[:name], bidder_path(group[:slug])
      end
      return str.html_safe
    else
      return link_to award.bidder.group, bidder_path(award.bidder) unless award.bidder.group.blank?
    end
  end
end

Hide 'UTE' prefix in bidder group name if there's only one group in the UTE
Hide 'UTE' prefix in bidder group name if there's only one group in the UTE
