class I18nLanguageSelect::Railtie

Protected Class Methods

add(pattern) click to toggle source
# File lib/i18n_language_select/railtie.rb, line 24
def self.add(pattern)
  files = Dir[File.join(File.dirname(__FILE__), '../', pattern)]
  I18n.load_path.concat(files)
end
pattern_from(args) click to toggle source
# File lib/i18n_language_select/railtie.rb, line 29
def self.pattern_from(args)
  array = Array(args || [])
  array.blank? ? '*' : "{#{array.join ','}}"
end