Project

honesty

0.0
No commit activity in last 3 years
No release in over 3 years
Store and track user activities and system events in a human-readable, easily-searchable format
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 0
 Project Readme

Honesty¶ ↑

Honesty is a Rails plugin that allows developers to store and track user activities and system events in a human-readable, easily-searchable format.

Installation¶ ↑

Get the gem¶ ↑

Add Honesty to your Gemfile:

gem 'honesty'

Generate the model¶ ↑

Rails 3:

rails g honesty

Rails 2:

script/generate honesty

Migrate:

rake db:migrate

Usage¶ ↑

Use Honesty in your ActiveRecord model:¶ ↑

class Shoe < ActiveRecord::Base
  honesty
end

Add a fact to a model instance:¶ ↑

Parameters:

  • Context - the object being acted on or the entity being tracked.

  • Agent - the actor, so to speak.

  • Action - the action taking place.

If you want to explicitly denote the context, pass all three parameters

shoe = Shoe.create
shoe.fact("Shoe", "Tim Boisvert", "Created Adidas Superstar II")

If you want to short-cut the fact and use the object’s class name as the context, just pass in the agent and the action

shoe = Shoe.create
shoe.fact("Tim Boisvert", "Created Adidas Superstar II")

Get facts¶ ↑

shoe = Shoe.find(1)
facts = shoe.facts.all

Credits¶ ↑

This plugin is heavily influenced by acts_as_commentable. Thanks to Jack Dempsey et al.

Contributors¶ ↑

Tim Boisvert

More¶ ↑

github.com/timboisvert/honesty