Extract event particulars helper method

This commit is contained in:
Jirka Hutárek
2026-03-02 15:08:23 +01:00
committed by Rosa Gutierrez
parent 7e05794114
commit f22afa7b56
+7 -4
View File
@@ -81,17 +81,20 @@ class Notification::EventPayload < Notification::DefaultPayload
card.title.presence || "Card #{card.number}" card.title.presence || "Card #{card.number}"
end end
def event_particulars
event.particulars.dig("particulars") || {}
end
def column_name def column_name
event.particulars.dig("particulars", "column") event_particulars["column"]
end end
def new_location_name def new_location_name
event.particulars.dig("particulars", "new_board") || event_particulars["new_board"] || event_particulars["new_collection"]
event.particulars.dig("particulars", "new_collection")
end end
def new_title def new_title
event.particulars.dig("particulars", "new_title") event_particulars["new_title"]
end end
def card_url_with_comment_anchor(comment) def card_url_with_comment_anchor(comment)