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-0.0.0.pre.04c0165 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.d32c080 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.8696eda lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.46e57d4 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.fdc9404 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.43f2d02 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.eb1e3a7 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.a4a23ec lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.6a28f40 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.d674859 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.325affe lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.b056cfc lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.c771649 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.c3cdb73 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.3537d57 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.1902868 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.d2debb5 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.0e0f672 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.7cf3ed8 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.b55f858 lib/octicons_helper/helper.rb