I'd like to add an "acts_as_notified" method to my active record classes
(User, for example) which, when the model is saved triggers some other
function, such as sending a mail, updating a log table etc.
I can get the acts_as_notified class method in the class, but I'm having
1. (The main problem) I'm not sure how to register an after_save hook in
my module. I've found docs but they're all rails 2/3 specific.
I can work around this by doing ActsAsNotified; u = User.first #
ActsAsNotified is the module my acts_as_notified method is in, but would
prefer not to have to do this.
2. If I open a rails console and do u = User.first, I get :
NameError: undefined local variable or method `acts_as_notified'
Any ideas? Good (updated docs)?