Class: TranslatedAttributesGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- TranslatedAttributesGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/translated_attributes/translated_attributes_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
6 7 8 |
# File 'lib/generators/translated_attributes/translated_attributes_generator.rb', line 6 def self.next_migration_number(dirname) Time.now.strftime("%Y%m%d%H%M%S") end |
Instance Method Details
#create_migration ⇒ Object
10 11 12 13 |
# File 'lib/generators/translated_attributes/translated_attributes_generator.rb', line 10 def create_migration template = File.('../templates/migration.rb', __FILE__) migration_template template, 'db/migrate/add_translations.rb' end |