Class: FlashValidators::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/flash_validators.rb

Class Method Summary collapse

Class Method Details

.add(locale) ⇒ Object



80
81
82
# File 'lib/flash_validators.rb', line 80

def self.add(locale)
  I18n.load_path << File.expand_path("../../config/locales/#{locale}.yml", __FILE__)
end

.locales_from(args) ⇒ Object



84
85
86
87
# File 'lib/flash_validators.rb', line 84

def self.locales_from(args)
  array = Array(args || [])
  array.blank? ? '*' : array
end