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-10.1.0.pre.961270a lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.2f6fb16 lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.8d865ba lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.48628a9 lib/octicons_helper/helper.rb
octicons_helper-10.1.0.pre.9512409 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.30d8d36 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.c41e48c lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.39d4ba0 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.2e5068e lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.9144bfc lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.2a787c9 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.2b7d934 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.4592a96 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.428acad lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.3a5e709 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.9165369 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.767cd9d lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.770acc5 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.9d8c0a1 lib/octicons_helper/helper.rb
octicons_helper-0.0.0.pre.4202cab lib/octicons_helper/helper.rb