Class: Eventsimple::Generators::Outbox::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Eventsimple::Generators::Outbox::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/eventsimple/generators/outbox/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
14 15 16 17 |
# File 'lib/eventsimple/generators/outbox/install_generator.rb', line 14 def self.next_migration_number(dirname) next_migration_number = current_migration_number(dirname) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end |
Instance Method Details
#copy_migrations ⇒ Object
19 20 21 22 23 |
# File 'lib/eventsimple/generators/outbox/install_generator.rb', line 19 def copy_migrations migration_template "create_outbox_cursor.erb", "db/migrate/create_eventsimple_outbox_cursor.rb", migration_version: migration_version end |
#migration_version ⇒ Object
25 26 27 |
# File 'lib/eventsimple/generators/outbox/install_generator.rb', line 25 def migration_version "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" end |