Sha256: 1cd3a685e3387a8052bc900ebf4a5a09838b09b5f22abf6333bcf633dd0ae95e

Contents?: true

Size: 357 Bytes

Versions: 6

Compression:

Stored size: 357 Bytes

Contents

module Lit
  module LocalizationsHelper
    def draw_icon(icon, opts = {})
      raw("<i class=\"fa fa-#{icon} #{opts[:class]}\" title=\"#{opts[:title]}\" ></i>")
    end

    def ejs(val)
      escape_javascript val.to_s
    end

    def allow_wysiwyg_editor?(key)
      Lit.all_translations_are_html_safe || key.to_s =~ /(\b|_|\.)html$/
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
motorefi-lit-0.3.3 app/helpers/lit/localizations_helper.rb
lit-0.3.3 app/helpers/lit/localizations_helper.rb
lit-0.3.1 app/helpers/lit/localizations_helper.rb
lit-0.3.0 app/helpers/lit/localizations_helper.rb
lit-0.2.6 app/helpers/lit/localizations_helper.rb
lit-0.2.5 app/helpers/lit/localizations_helper.rb