Acts_as_audited - with ActiveRBAC? - how to setup User


I have ActiveRBAC working, but I’m trying to use acts_as_audited ( ). I’m not exactly sure
how to setup the required class/object with the appropriate method that
it needs to get the username. You can configure a user_class_name and
a method_name within this which will pull back the userid/name. Refer
to extract from one method within the plugin below. What I’m not sure
about (still new to ruby) is how to:

a) setup the appropriate class

b) probably more to the point, how to make sure it’s in the required
context for acts_as_audited to get

Any ideas?

    def write_audit(action = :update)
        user = self.audited_user_class_name ? 

: nil
audits.create(:changes => @changed_attributes, :action =>
action.to_s, :user_id => user ? : nil)