Sha256: fd1cf0619ed0166190520f13ae03afeaba0109a16fea86269cdf44aa45bbeb7f
Contents?: true
Size: 436 Bytes
Versions: 7
Compression:
Stored size: 436 Bytes
Contents
module Trestle class Tab include ActionView::Helpers::TagHelper attr_reader :name, :options def initialize(name, options={}) @name, @options = name, options end def label safe_join([options[:label] || I18n.t("admin.tabs.#{name}", default: name.to_s.titleize), badge].compact, " ") end def badge content_tag(:span, options[:badge], class: "badge") if options[:badge] end end end
Version data entries
7 entries across 7 versions & 1 rubygems