Sha256: 53262896f510c08012465c1ab3ff10d5b4da4fa68b3bc9cc4031b6c22a70c3e5

Contents?: true

Size: 539 Bytes

Versions: 3

Compression:

Stored size: 539 Bytes

Contents

module TechRadar
  module ApplicationHelper
    def label_color_for_ring(ring_name)
      if ring_name == 'Adopt'
        :success
      elsif ring_name == 'Hold'
        :warning
      else
        :default
      end
    end

    def panel_type_for_technology_why(technology)
      if technology.why_summary.blank? && warn_on_missing_why?(technology)
        :warning
      else
        :default
      end
    end

    def warn_on_missing_why?(technology)
      technology.ring != 'Adopt' && technology.ring != 'Trial'
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tech_radar-0.2.0 app/helpers/tech_radar/application_helper.rb
tech_radar-0.1.0 app/helpers/tech_radar/application_helper.rb
tech_radar-0.0.1 app/helpers/tech_radar/application_helper.rb