Class: Bootstrap::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/bootstrap/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#add_localeObject



10
11
12
13
14
15
16
17
# File 'lib/generators/bootstrap/install/install_generator.rb', line 10

def add_locale
  if File.exist?("config/locales/en.bootstrap.yml")
    localez = File.read("config/locales/en.bootstrap.yml")
    insert_into_file "config/locales/en.bootstrap.yml", localez, :after => "en\n"
  else
    copy_file "en.bootstrap.yml", "config/locales/en.bootstrap.yml"
  end
end