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.dbf02d1 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.73857e3 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.4f55000 lib/octicons_helper/helper.rb
octicons_helper-10.0.0 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.76baad6 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.8e7b0cd lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.d56a724 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.c902354 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.4feef6b lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.62f98ff lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.1e04bad lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.cb263c2 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.12c5e5a lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.3bffdfe lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.3e5e016 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.0f04584 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.c903cc8 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.c6054bd lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.0fedc28 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.436cd2c lib/octicons_helper/helper.rb