Class: IdempotencyLock::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- IdempotencyLock::Generators::InstallGenerator
- Includes:
- ActiveRecord::Generators::Migration
- Defined in:
- lib/generators/idempotency_lock/install_generator.rb
Overview
Generator to create the idempotency_locks table migration. Run with: rails generate idempotency_lock:install
Instance Method Summary collapse
Instance Method Details
#create_migration_file ⇒ Object
17 18 19 20 21 22 |
# File 'lib/generators/idempotency_lock/install_generator.rb', line 17 def create_migration_file migration_template( "create_idempotency_locks.rb.erb", "db/migrate/create_idempotency_locks.rb" ) end |
#migration_version ⇒ Object
24 25 26 |
# File 'lib/generators/idempotency_lock/install_generator.rb', line 24 def migration_version "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]" end |