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-4.4.0.pre.29af18c6 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.a21aaed5 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.8fea71ab lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.a7a0db4b lib/octicons_helper/helper.rb
octicons_helper-7.3.0.pre.d28bd192 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.c3133317 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.653a2714 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.6df34bf1 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.0448a860 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.1b9969ac lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.8fd2622e lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.6c42d500 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.955417e7 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.75bbf905 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.e8c3035f lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.30f25f97 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.a295d642 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.5704ee36 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.a16c63d2 lib/octicons_helper/helper.rb
octicons_helper-4.3.0.pre.a18a05b9 lib/octicons_helper/helper.rb