[Rails] How to Disable Callbacks on a Model
Lachlan Laycock
supagroova at gmail.com
Wed Aug 9 01:19:54 GMT 2006
Does anyone know how to disable a model's callbacks?
I have a routine that increments a page_view counter for various model
objects in an after_filter in my ApplicationController. I call this:
increment_page_view()
Rather that checking through the trace array in each model callback for
"increment_page_view" I'd rather disable the callbacks from inside
increment_page_view() itself.
Seems like it should be possible, but don't seem to be able to work it
out.
Anybody done this or have ideas on how to do it?
Thanks :-)
--
Posted via http://www.ruby-forum.com/.
More information about the Rails
mailing list