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.ef71d8af3 lib/octicons_helper/helper.rb
octicons_helper-8.3.0 lib/octicons_helper/helper.rb
octicons_helper-8.4.0.pre.4585d562 lib/octicons_helper/helper.rb
octicons_helper-8.3.0.pre.7cb9c615 lib/octicons_helper/helper.rb
octicons_helper-8.3.0.pre.84b9714a lib/octicons_helper/helper.rb
octicons_helper-8.3.0.pre.7f92597b lib/octicons_helper/helper.rb
octicons_helper-8.3.0.pre.6aa0af0f lib/octicons_helper/helper.rb
octicons_helper-8.2.0 lib/octicons_helper/helper.rb
octicons_helper-8.3.0.pre.d5b1062c lib/octicons_helper/helper.rb
octicons_helper-8.3.0.pre.1279dfdb lib/octicons_helper/helper.rb
octicons_helper-8.2.0.pre.c4b0d3f9 lib/octicons_helper/helper.rb
octicons_helper-8.1.3 lib/octicons_helper/helper.rb
octicons_helper-8.2.0.pre.2edf502d lib/octicons_helper/helper.rb
octicons_helper-8.2.0.pre.02477e4a lib/octicons_helper/helper.rb
octicons_helper-8.2.0.pre.84b7d794 lib/octicons_helper/helper.rb
octicons_helper-8.1.2 lib/octicons_helper/helper.rb
octicons_helper-8.2.0.pre.e533a200 lib/octicons_helper/helper.rb
octicons_helper-8.1.1 lib/octicons_helper/helper.rb
octicons_helper-8.2.0.pre.54e3a20a lib/octicons_helper/helper.rb
octicons_helper-8.2.0.pre.922a9dc3 lib/octicons_helper/helper.rb