Intridea Blog: Technology, Design, Business

Back to Blog

Get in Touch

You're currently viewing posts tagged with: "callbacks"

Define Custom Callbacks for ActiveRecord and More

By Jerry Cheung | March 22, 2012 ActiveRecord, callbacks, activesupport

Rails ActiveRecord models have a lifecycle that developers are allowed to hook into. But while most of us know about before_save and after_update, there are a few lesser unknown callbacks that are good to know about before you reinvent them. In this post, I'll cover all of the available ActiveRecord lifecycle callbacks, and also show how you can define custom callbacks for normal ruby objects.

Read more…

Temporarily disable ActiveRecord callbacks

By Brent Collier | March 12, 2009 ActiveRecord, callbacks