Class: NaiveSearch::Generators::MigrationGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- NaiveSearch::Generators::MigrationGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/naive_search/migration/migration_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
14 15 16 |
# File 'lib/generators/naive_search/migration/migration_generator.rb', line 14 def self.next_migration_number(dirname) Time.now.strftime("%Y%m%d%H%M%S") end |
Instance Method Details
#create_migration ⇒ Object
18 19 20 |
# File 'lib/generators/naive_search/migration/migration_generator.rb', line 18 def create_migration migration_template "add_naive_search_index.rb", "db/migrate/add_naive_search_index_to_#{class_name.underscore}.rb" end |