Sha256: 3eb05ad413389c496057ae7a1bb740ab700d3901065b09b1d68916f522a2f089

Contents?: true

Size: 520 Bytes

Versions: 8

Compression:

Stored size: 520 Bytes

Contents

require "baza_models"

module ::AwesomeTranslations::ApplicationHelper
  include BazaModels::Helpers::RansackerHelper

  def flash_message_class(type)
    type = type.to_s
    type = "success" if type == "notice"
    type = "danger" if type == "alert"
    type = "danger" if type == "error"
    type
  end

  def path_without_root(path)
    path.gsub(/\A#{Regexp.escape(Rails.root.to_s)}(\/|)/, "")
  end

  def path_without_root_or_locales(path)
    path_without_root(path).gsub(/\Aconfig\/locales(\/|)/, "")
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
awesome_translations-0.0.66 app/helpers/awesome_translations/application_helper.rb
awesome_translations-0.0.65 app/helpers/awesome_translations/application_helper.rb
awesome_translations-0.0.64 app/helpers/awesome_translations/application_helper.rb
awesome_translations-0.0.63 app/helpers/awesome_translations/application_helper.rb
awesome_translations-0.0.62 app/helpers/awesome_translations/application_helper.rb
awesome_translations-0.0.61 app/helpers/awesome_translations/application_helper.rb
awesome_translations-0.0.60 app/helpers/awesome_translations/application_helper.rb
awesome_translations-0.0.59 app/helpers/awesome_translations/application_helper.rb