Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

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

Generator for ApplicationNotification base class #94

Closed
rafaelpivato opened this issue Feb 21, 2021 · 1 comment
Closed

Generator for ApplicationNotification base class #94

rafaelpivato opened this issue Feb 21, 2021 · 1 comment

Comments

@rafaelpivato
Copy link

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.

@excid3
Copy link
Owner

excid3 commented Mar 26, 2021

Definitely like this idea. I had manually added an ApplicationNotification to JumpstartRails.com and it would be great ot have built-in.

Repository owner locked and limited conversation to collaborators Oct 31, 2023
@Kentasmic Kentasmic converted this issue into discussion #341 Oct 31, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants