Sha256: 740d43b38df43a1feb87285131d0f1db0846272006256db3d089210e5de9814d

Contents?: true

Size: 327 Bytes

Versions: 379

Compression:

Stored size: 327 Bytes

Contents

require "octicons"
require "action_view"

module OcticonsHelper

  include ActionView::Helpers::TagHelper

  def octicon(symbol, options = {})
    return "" if symbol.nil?

    icon = Octicons::Octicon.new(symbol, options)
    content_tag(:svg, icon.path.html_safe, icon.options) # rubocop:disable Rails/OutputSafety
  end
end

Version data entries

379 entries across 379 versions & 2 rubygems

Version Path
octicons_helper-4.3.0.pre.ab8f6d66 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.982097c9 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.b41121ca lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.8f120ac7 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.9d94633b lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.60d21a75 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.d7728f2d lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.a0d68d5d lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.2cb57f78 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.542d2f63 lib/octicons_helper/helper.rb
octicons_helper-4.2.0 lib/octicons_helper/helper.rb
octicons_helper-4.1.0.pre.802761e0 lib/octicons_helper/helper.rb
octicons_helper-4.1.0.pre.a716a786 lib/octicons_helper/helper.rb
octicons_helper-4.1.0.pre.alpha.1135d0d2 lib/octicons_helper/helper.rb
octicons_helper-4.1.0.pre.alpha.85d2a6a8 lib/octicons_helper/helper.rb
octicons_helper-4.0.7 lib/octicons_helper/helper.rb
octicons_helper-4.0.6 lib/octicons_helper/helper.rb
octicons_helper-4.0.5 lib/octicons_helper/helper.rb
octicons_helper-4.0.3 lib/octicons_helper/helper.rb