Class: Mobility::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Mobility::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/mobility/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
30 31 32 |
# File 'lib/generators/mobility/install_generator.rb', line 30 def self.next_migration_number(dirname) ::ActiveRecord::Generators::Base.next_migration_number(dirname) end |
Instance Method Details
#create_initializer ⇒ Object
23 24 25 26 27 28 |
# File 'lib/generators/mobility/install_generator.rb', line 23 def create_initializer create_file( "config/initializers/mobility.rb", "Mobility.config.default_backend = :key_value" ) end |
#create_migration_file ⇒ Object
18 19 20 21 |
# File 'lib/generators/mobility/install_generator.rb', line 18 def create_migration_file add_mobility_migration("create_text_translations") unless .without_tables? add_mobility_migration("create_string_translations") unless .without_tables? end |