Open nchatu opened 11 years ago
On a slightly related note, I noticed that there's an after_audit callback which was not documented in the README. Is there a reason why?
Was curious because I had to stumbleupon the existence of that callback and it may save other people some time if it was documented.
Have you actually gotten that callback to work?
I could not get that to work, so instead I created an observer like so:
class AuditObserver < ActiveRecord::Observer
observe Audited::Adapters::ActiveRecord::Audit
def before_create(audit)
puts 'sup?'
end
end
So.... no callback support as of yet?
Would it not make sense to use Custom Audit Model for this use case? https://github.com/collectiveidea/audited#custom-audit-model
Would it not make sense to use Custom Audit Model for this use case? https://github.com/collectiveidea/audited#custom-audit-model
Hi, can you please share any examples of this. Thanks :) There not much information in README.
Is there a way to add custom callbacks to a audited model? For example completing a task. Currently I add a flag to comments column to identify custom action but it doesn't feel as a clean way to do it.