title: Ruby on Rails: How to have ActiveRecord callback load a shared variable between callbacks
body: <p>I have a couple of <code>before_save</code> and <code>after_save</code> callbacks that need to share an instance of an object between each other in a Ruby on Rails project. I thought that adding an additional method called <code>load_object</code> where I load the object into an instance variable would do the trick. This worked fine for the <code>before_save</code> validations, but the object didn't persist to the <code>after_save</code> chain of methods. Is there anyway to make sure it's around for both sets while keeping my code DRY?</p>