Sha256: 6758f7568866b6e6ca48249d2c7e11e9688f9e928a9c43c97954f795c31ea511
Contents?: true
Size: 601 Bytes
Versions: 17
Compression:
Stored size: 601 Bytes
Contents
module MaintenanceLightHelper def format_maintenance_light(arg, options={}) maintenance_light = arg.respond_to?(:maintenance_light) ? arg.maintenance_light : arg return "—".html_safe if maintenance_light.nil? html = <<-HTML <span class="maintenance-light" rel="tooltip" title="#{maintenance_light.message}"> <i class="stoplight #{maintenance_light.color}"></i> #{maintenance_light.dependency_name if options.fetch(:with_name, false)} #{maintenance_light.version} </span> HTML html.html_safe rescue Rubygems::Error "?".html_safe end end
Version data entries
17 entries across 17 versions & 1 rubygems