Class: TkhAuthentication::Generators::CreateOrUpdateLocalesGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/tkh_authentication/create_or_update_locales/create_or_update_locales_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_localesObject


8
9
10
11
12
13
# File 'lib/generators/tkh_authentication/create_or_update_locales/create_or_update_locales_generator.rb', line 8

def copy_locales
  puts 'creating locale files'
  I18n.available_locales.each do |l|
    copy_file "#{l.to_s}.yml", "config/locales/tkh_authentication.#{l.to_s}.yml"
  end
end