Class: Locale::HelperGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
ActiveGenerator::Base, Base
Defined in:
lib/generators/locale/helper/helper_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_helper_fileObject



14
15
16
17
18
19
# File 'lib/generators/locale/helper/helper_generator.rb', line 14

def create_helper_file
  assert_valid_language!
  path = File.join("config/locales/#{language}/helpers", namespace_path, "#{file_name}.yml")

  template('helper.yml', path)
end