Question: Save with custom columns #317
Answered
by
excid3
janpeterka
asked this question in
Q&A
-
Hi, this may be stupid question, I'm quite new to Rails, so some things are not obvious to me. My
Thanks for help! |
Beta Was this translation helpful? Give feedback.
Answered by
excid3
Oct 25, 2023
Replies: 1 comment 7 replies
-
See https://github.com/excid3/noticed/blob/main/docs/delivery_methods/database.md and class MyNotification do
deliver_by :database, format: :custom_attributes
def custom_attributes
notification.params.slice(:announcement, :content, :content_message).merge(
type: notification.class.name,
params: notification.params
)
end
end |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
janpeterka
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://github.com/excid3/noticed/blob/main/docs/delivery_methods/database.md and
noticed/lib/noticed/delivery_methods/database.rb
Line 6 in a970f68