Class: FlashValidators::Railtie

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

Class Method Summary collapse

Class Method Details

.locales_from(args) ⇒ Object



86
87
88
89
# File 'lib/flash_validators.rb', line 86

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

.path(locale) ⇒ Object



82
83
84
# File 'lib/flash_validators.rb', line 82

def self.path(locale)
  File.expand_path("../../config/locales/#{locale}.yml", __FILE__)
end