Class: Webhookdb::Messages::OrgDatabaseMigrationFinished

Inherits:
Webhookdb::Message::Template show all
Defined in:
lib/webhookdb/messages/org_database_migration_finished.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Webhookdb::Message::Template

#dispatch, #dispatch_email, #extra_fields, #full_template_name, #layout, #layout_path, #liquify, #template_folder, #template_name, #template_path

Constructor Details

#initialize(org_database_migration) ⇒ OrgDatabaseMigrationFinished

Returns a new instance of OrgDatabaseMigrationFinished.



12
13
14
15
# File 'lib/webhookdb/messages/org_database_migration_finished.rb', line 12

def initialize(org_database_migration)
  @org_database_migration = org_database_migration
  super()
end

Class Method Details

.fixtured(recipient) ⇒ Object



6
7
8
9
10
# File 'lib/webhookdb/messages/org_database_migration_finished.rb', line 6

def self.fixtured(recipient)
  dbm = Webhookdb::Fixtures.organization_database_migration.with_urls.finished.create
  Webhookdb::Fixtures.organization_membership.org(dbm.organization).customer(recipient).verified.admin.create
  return self.new(dbm)
end

Instance Method Details

#liquid_dropsObject



17
18
19
20
21
22
# File 'lib/webhookdb/messages/org_database_migration_finished.rb', line 17

def liquid_drops
  return super.merge(
    org_name: @org_database_migration.organization.name,
    destination_host: @org_database_migration.displaysafe_destination_url,
  )
end