Class: Basho::Generators::InstallTablesGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
ActiveRecord::Generators::Migration
Defined in:
lib/generators/basho/install_tables/install_tables_generator.rb

Overview

+basho_prefectures+ / +basho_cities+ テーブルのマイグレーションジェネレータ。

Examples:

rails generate basho:install_tables

Instance Method Summary collapse

Instance Method Details

#create_migration_filesvoid

This method returns an undefined value.

マイグレーションファイルを生成する。



22
23
24
25
# File 'lib/generators/basho/install_tables/install_tables_generator.rb', line 22

def create_migration_files
  migration_template "create_basho_prefectures.rb.erb", "db/migrate/create_basho_prefectures.rb"
  migration_template "create_basho_cities.rb.erb", "db/migrate/create_basho_cities.rb"
end