Sha256: cf124ffba5385d73689bb5e9cbd845fbae8ff097176f5c15da138e80e553a7b2

Contents?: true

Size: 521 Bytes

Versions: 27

Compression:

Stored size: 521 Bytes

Contents

module Workarea
  module Admin
    module FacetsHelper
      def facet_value_display_name(facet, value)
        if facet.system_name == 'tags'
          value
        elsif facet.system_name == 'upcoming_changes'
          Release.where(id: value).pluck(:name).first
        elsif facet.system_name == 'active_by_segment'
          Segment.where(id: value).pluck(:name).first ||
          t('workarea.admin.segments.missing', id: value[0..4])
        else
          value.titleize
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
workarea-admin-3.5.6 app/helpers/workarea/admin/facets_helper.rb
workarea-admin-3.5.5 app/helpers/workarea/admin/facets_helper.rb
workarea-admin-3.5.4 app/helpers/workarea/admin/facets_helper.rb
workarea-admin-3.5.3 app/helpers/workarea/admin/facets_helper.rb
workarea-admin-3.5.2 app/helpers/workarea/admin/facets_helper.rb
workarea-admin-3.5.1 app/helpers/workarea/admin/facets_helper.rb
workarea-admin-3.5.0 app/helpers/workarea/admin/facets_helper.rb