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
-
For create the changes are shown in one sentance
-
For update each changes are shown in seperate sentence
Translation keys: -> nil to value -> value to another value -> value to nil
-
For fields ends with _id, the model has to respond with a readable name
-
Any changes can be notifuied to users.
-
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