I'm trying to figure out how to setup a notifications system using Mailboxer.
I've already used it to setup an in-site messaging system so that users can message each other. Now I'd like to use it to send notifications from the site, to notify users of changes in their reputation points or remind them of actions they must complete. Something like Facebook or Stackoverflow's dropdown notification menus.
As an example, it might contain these types of notices:
- User gets some points for performing an action:
"You received 50 points for helping #{user.name} with #{request.title}.
- A reminder that the user must perform an action:
"You must review #{user.name}'s help with #{request.title}!
- Will link to a page to complete that action.
- User receives a reply to a message they sent:
"You've received a message from #{sender.name}"
- Will link to the message.
Here are some details:
I don't want all notifications to send an email. Most will only need to be seen in the notifications menu. Is there an option in Mailboxer to control what is emailed, or would I have to bypass Mailboxer's mailers?
I'll want to format each type of notification differently in the dropdown. Add a specific glyphicon to each for example. Could I use the notification
type
field for this (using it to set a conditional)? How doestype
work? Can I just set it to a string, such as "reputation", depending on the notification?Objects can be passed to the
notify
method. I'm confused about the purpose of this. How can that object be used? What objects would I want to send?
Feel free to leave some general info on Mailboxer notifications rather than specifically answering everything.
I've had pretty bad luck finding documentation for the notifications features, so would appreciate it if someone with some Mailboxer knowledge could chime in on this. Thanks in advance.