Class: ActiveOutboxGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- ActiveOutboxGenerator
show all
- Includes:
- ActiveOutbox::AdapterHelper
- Defined in:
- lib/active_outbox/generators/active_outbox_generator.rb
Instance Method Summary
collapse
json_type, postgres?, uuid_type
Instance Method Details
#create_migration_files ⇒ Object
13
14
15
16
17
18
19
20
|
# File 'lib/active_outbox/generators/active_outbox_generator.rb', line 13
def create_migration_files
migration_path = "#{options['root_components_path']}/db/migrate"
migration_template(
'migration.rb',
"#{migration_path}/outbox_create_#{table_name}.rb",
migration_version: migration_version
)
end
|
#migration_version ⇒ Object
22
23
24
|
# File 'lib/active_outbox/generators/active_outbox_generator.rb', line 22
def migration_version
"[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
end
|
#table_name ⇒ Object
26
27
28
|
# File 'lib/active_outbox/generators/active_outbox_generator.rb', line 26
def table_name
"#{name}_outboxes"
end
|