Skip to content

adambird/notificon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notificon

Gem for tracking and managing application notifications for users. Just an abstraction of some common functionality.

It currently uses MongoDB as a datastore

Setup

Add the gem to your Gemfile

gem 'notificon'

Configure the data store

Notificon.setup do |config|
  config.connection_profile = mongodb://server
end

You can also pass in a logger and cache for the gem to use

Notificon.setup do |config|
  config.connection_profile = mongodb://.......
  config.logger = Rails.logger
  config.cache = Rails.cache
end

** TODO ** rake task for ensuring indexes

Usage

The core operations have been exposed as a class methods on the Notificon module

Recording a notification

Notificon.add_notification(username, item_url, item_text, actor, action, occured_at, item_id)
  • username - The String identifying the user being notified
  • item_url - A String url of the item notification relates to
  • item_text - A String that describes the item
  • actor - The String identifying the user that performed the action
  • action - A Symbol representing the action that the actor performed
  • occured_at - The Time the action was performed
  • item_id - A String uniquely identifying the item the notification is for

About

Gem for tracking and managing application notifications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages