Project

auditlog

0.0
No commit activity in last 3 years
No release in over 3 years
Rails gem to track active record model changes. Allows user to track action based model changes.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Auditlog¶ ↑

This project rocks and uses MIT-LICENSE.

¶ ↑

Need to work with notification class Task < ActiveRecord::Base

attach_notification(:assign_to_me, [:assign_id]) do |task, current_user|
    if task.user == current_user
        notify task.user
    end
end

end

Changes render support

  1. For create the changes are shown in one sentance

  2. For update each changes are shown in seperate sentence

    Translation keys:
        -> nil to value
        -> value to another value
        -> value to nil
  3. For fields ends with _id, the model has to respond with a readable name

  4. Any changes can be notifuied to users.

  5. Notification and the history will render the same partial or use the same translation key.

Sample translation file


en:

auditlog:
  Default:
    created: %{model} created
  Task:
    created: Task created
    assigned_to_id:
      cleared: Unassigned from %{assigned_to_was}
      changed: Assigned from %{assigned_to_was} to %{assigned_to_now}
      set: Assigned to %{assigned_to_now}

UserNotification

¶ ↑

user_id changes_id read_at