Active Record Callbacks. This guide teaches you how to hook into the life cycle of your Active Record objects. After reading this guide, you will know: The life cycle of Active Record objects. How to create callback methods that respond to events in the object life cycle. How to create special classes that encapsulate common behavior ...
You can trigger calling and before_save callbacks like this:after_save
foo.run_callbacks(:save) { foo.update_columns(...) }
See .ActiveSupport::Callbacks
This solution is Rails 2 only.
I just investigated this and I think I have a solution. There are two ActiveRecord private methods that you can use:
update_without_callbacks
create_without_callbacks
You're going to have to use send to call these methods. examples:
p = Person.new(:name => 'foo')
p.send(:create_without_callbacks)
p = Person.find(1)
p.send(:update_without_callbacks)
This is definitely something that you'll only really want to use in the console or while doing some random tests. Hope this helps!