Class: Jpstation::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Jpstation::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/jpstation/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
22 23 24 |
# File 'lib/generators/jpstation/install_generator.rb', line 22 def self.next_migration_number(path) ActiveRecord::Generators::Base.next_migration_number(path) end |
Instance Method Details
#copy_migrations ⇒ Object
11 12 13 14 15 16 |
# File 'lib/generators/jpstation/install_generator.rb', line 11 def copy_migrations migration_template 'migrations/prefectures.rb', 'db/migrate/create_prefectures.rb' unless prefecture_model_exist? migration_template 'migrations/railway_companies.rb', 'db/migrate/create_railway_companies.rb' migration_template 'migrations/railway_lines.rb', 'db/migrate/create_railway_lines.rb' migration_template 'migrations/railway_stations.rb', 'db/migrate/create_railway_stations.rb' end |
#show_readme ⇒ Object
18 19 20 |
# File 'lib/generators/jpstation/install_generator.rb', line 18 def show_readme readme "README" end |