Skip to content

Commit

Permalink
return back model_naming method with small update and use it as fallb…
Browse files Browse the repository at this point in the history
…ack in case of missing table_name & schema_name
  • Loading branch information
Sergey Sta committed Sep 25, 2024
1 parent 4808ce4 commit 2aecb81
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/table_sync/publishing/message/raw.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ def publish

def notify!
TableSync::Instrument.notify(
table: table_name,
schema: schema_name,
table: table_name || model_naming.table,
schema: schema_name || model_naming.schema,
event: event,
count: original_attributes.count,
direction: :publish,
)
end

def model_naming
TableSync.publishing_adapter.model_naming(model_name.constantize)
end

# MESSAGE PARAMS

def message_params
Expand Down

0 comments on commit 2aecb81

Please sign in to comment.