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-11.0.0.pre.7418f68 lib/octicons_helper/helper.rb
octicons_helper-11.0.0.pre.4a02a5e lib/octicons_helper/helper.rb
octicons_helper-11.0.0.pre.150d490 lib/octicons_helper/helper.rb
octicons_helper-11.0.0.pre.f423300 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.46e6fe9 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.368676c lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.cf746b8 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.300c0af lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.3c6f57b lib/octicons_helper/helper.rb
octicons_helper-10.1.0 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.b6dbe56 lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.b6dbe56 lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.b8ebc4a lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.f8dcead lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.73eea64 lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.8fbc115 lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.97c6b85 lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.782a7e4 lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.ee3d3d6 lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.ed280d4 lib/octicons_helper/helper.rb