Class: I18nFactory::Generators::ModelGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- I18nFactory::Generators::ModelGenerator
- Defined in:
- lib/generators/model_generator.rb
Instance Attribute Summary collapse
-
#current_locale ⇒ Object
Returns the value of attribute current_locale.
Instance Method Summary collapse
Instance Attribute Details
#current_locale ⇒ Object
Returns the value of attribute current_locale.
19 20 21 |
# File 'lib/generators/model_generator.rb', line 19 def current_locale @current_locale end |
Instance Method Details
#create_i18_file ⇒ Object
21 22 23 24 25 26 |
# File 'lib/generators/model_generator.rb', line 21 def create_i18_file I18nFactory::Locale.all.each do |locale| self.current_locale = locale template 'i18n.yml.erb', path_for_i18n(locale) end end |