Class: RubyUIAdmin::Generators::LocalesGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/ruby_ui_admin/locales/locales_generator.rb

Overview

Copies the bundled locale files into the host app so they can be edited/extended.

Instance Method Summary collapse

Instance Method Details

#copy_localesObject



14
15
16
17
18
19
# File 'lib/generators/ruby_ui_admin/locales/locales_generator.rb', line 14

def copy_locales
  Dir[File.join(self.class.source_root, "config", "locales", "*.yml")].each do |file|
    relative = File.join("config", "locales", File.basename(file))
    copy_file relative, relative
  end
end