Class: ReactiveObservers::PostgresqlListenersGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
ActiveRecord::Generators::Migration
Defined in:
lib/generators/reactive_observers/postgresql_listeners_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_install_fileObject



14
15
16
# File 'lib/generators/reactive_observers/postgresql_listeners_generator.rb', line 14

def copy_install_file
  migration_template 'postgresql_listeners_migration.rb', File.join(db_migrate_path, "create_postgresql_listeners.rb")
end

#table_listenersObject



18
19
20
# File 'lib/generators/reactive_observers/postgresql_listeners_generator.rb', line 18

def table_listeners
  format ReactiveObservers.configuration.listening_job_name, table_name: ''
end