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-8.2.0.pre.4c94151d lib/octicons_helper/helper.rb
octicons_helper-8.2.0.pre.b2d34911 lib/octicons_helper/helper.rb
octicons_helper-8.1.0 lib/octicons_helper/helper.rb
octicons_helper-8.2.0.pre.fd92766c lib/octicons_helper/helper.rb
octicons_helper-8.1.0.pre.10b70995 lib/octicons_helper/helper.rb
octicons_helper-8.1.0.pre.389cfd40 lib/octicons_helper/helper.rb
octicons_helper-8.1.0.pre.0f7dcd39 lib/octicons_helper/helper.rb
octicons_helper-8.1.0.pre.f38b1615 lib/octicons_helper/helper.rb
octicons_helper-8.1.0.pre.654d9e0e lib/octicons_helper/helper.rb
octicons_helper-8.0.0 lib/octicons_helper/helper.rb
octicons_helper-7.4.0 lib/octicons_helper/helper.rb
octicons_helper-7.4.0.pre.45ba88e5 lib/octicons_helper/helper.rb
octicons_helper-7.4.0.pre.92883216 lib/octicons_helper/helper.rb
octicons_helper-7.4.0.pre.a4b16c23 lib/octicons_helper/helper.rb
octicons_helper-7.4.0.pre.6839c7e0 lib/octicons_helper/helper.rb
octicons_helper-7.4.0.pre.eca10f7d lib/octicons_helper/helper.rb
octicons_helper-7.4.0.pre.c307693f lib/octicons_helper/helper.rb
octicons_helper-7.4.0.pre.c01fb793 lib/octicons_helper/helper.rb
octicons_helper-7.4.0.pre.4baea4bb lib/octicons_helper/helper.rb
octicons_helper-7.4.0.pre.3e482a24 lib/octicons_helper/helper.rb