We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To favor sub-classing, allow default options to be defined for a notification. Here goes a suggestion:
class ApplicationNotification < Noticed::Base deliver_by_defaults :database, format: :database_format deliver_by_defaults :action_cable, format: :action_cable_format deliver_by_defaults :twilio, credentials: :twilio_credentials def database_format { 'type': self.class.name, 'params': params } end def action_cable_format params end def twilio_credentials { account_sid: ENV['TWILIO_ACCOUNT_SID'], auth_token: ENV['TWILIO_AUTH_TOKEN'], phone_number: ENV['TWILIO_PHONE_NUMBER'] } end end class CommentCreatedNotification < ApplicationNotification deliver_by :database deliver_by :action_cable deliver_by :twilio end
This wold work nice with #94 as well.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
To favor sub-classing, allow default options to be defined for a notification. Here goes a suggestion:
This wold work nice with #94 as well.
The text was updated successfully, but these errors were encountered: