noticed
noticed copied to clipboard
Generator for ApplicationNotification base class
Create a generator noticed:application_notification to create a base class for notifications of a Rails application.
class ApplicationNotification < Noticed::Base
def database_format
{
'type': self.class.name,
'params': params
}
end
def action_format
params
end
end
It would be good if noticed:notification could be modified to inherit from this ApplicationNotification whenever it exists. On the other hand, a warning could also be emitted if you have notifications already created in order to update their super class.
Definitely like this idea. I had manually added an ApplicationNotification to JumpstartRails.com and it would be great ot have built-in.