search for: auditsweep

Displaying 1 result from an estimated 1 matches for "auditsweep".

Did you mean: auditsweeper
2009 Aug 04
0
Authlogic::How to access current user from within a cache sweeper?
...rom within my cache sweeper. Normally you just reference @current_user but that doesn''t seem to be the case here. In Chad''s example, he calls controller.session[:user]. What''s the Authlogic equivalent? Thanks for any help. Here is Chad''s full example: class AuditSweeper < ActionController::Caching::Sweeper observe Person def after_destroy(record) log(record, "DESTROY" ) end def log(record, event, user = controller.session[:user]) AuditTrail.create(:record_id => record.id, :record_type => record.type.name, :event => event,...