Displaying 1 result from an estimated 1 matches for "save_log".
Did you mean:
have_log
2010 Mar 28
1
keeping track of who did what
hello everybody.
i need to log "who did what" on some models. i was reading recipe 59
of rails recipes and i created something like that:
class LogSweeper < ActionController::Caching::Sweeper
observe :model1, :model2, :model3, :model4, :model5, ...
after_save(model)
save_log(model, "save")
end
after_destroy(model)
save_log(model, "destroy)
end
private
save_log(model, event, user_id = controller.session[:account_id])
#create the log entry, i want to save the id of the model, the id
of the logged user and something to describe the acti...