Class: Mobility::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Mobility::InstallGenerator
show all
- Includes:
- ActiveRecordMigrationCompatibility, Rails::Generators::Migration
- Defined in:
- lib/rails/generators/mobility/install_generator.rb
Class Method Summary
collapse
Instance Method Summary
collapse
#activerecord_migration_class
Class Method Details
.next_migration_number(dirname) ⇒ Object
30
31
32
|
# File 'lib/rails/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
26
27
28
|
# File 'lib/rails/generators/mobility/install_generator.rb', line 26
def create_initializer
copy_file "initializer.rb", "config/initializers/mobility.rb"
end
|
#create_migration_file ⇒ Object
21
22
23
24
|
# File 'lib/rails/generators/mobility/install_generator.rb', line 21
def create_migration_file
add_mobility_migration("create_text_translations") unless options.without_tables?
add_mobility_migration("create_string_translations") unless options.without_tables?
end
|