Sha256: b970a4eb61be23e60fbdc946fbec29d928310f2e25006b0e2fe5a457e3aced57

Contents?: true

Size: 946 Bytes

Versions: 5

Compression:

Stored size: 946 Bytes

Contents

# ActivityEngine

A mountable Rails engine for both recording activity and displaying activity on
a persisted object.

## Installation

Add this line to your application's Gemfile:

    gem 'activity_engine'

And then execute:

    $ bundle

Then run:

    $ rails g activity_engine:install

## Register a Method

To record activity, register a class and method via a Rails generator.

    $ rails g activity_engine:register <ClassName> <MethodName> <Subject>

Or by hand in a config/initializers/activity_engine_config.rb

    ActivityEngine.register('<ClassName>', '<MethodName>') do |activity,context|
      activity.subject = context.<subject>
      activity.user = context.current_user
      activity.activity_type = "an arbitrary type"
      activity.message = "A particulare message?"
    end

Then, whenever the ClassName#MethodName is invoke an activity will be recorded.

## TODO

* Provide a means for retrieving an object's activities

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
activity_engine-0.0.7 README.md
activity_engine-0.0.6 README.md
activity_engine-0.0.5 README.md
activity_engine-0.0.3 README.md
activity_engine-0.0.2 README.md