 <pre><code> belongs_to :product, touch: true </code></pre> <p>and</p> <pre><code> after_save { product.touch } </code></pre> <p>do the same thing. However touch won't be called on <code>create</code> so you might need to use an <code>after_create</code> callback:</p> <pre><code>after_create :touch_product def touch_product self.product.touch end </code></pre> <p>for update and destroy <code>belongs_to :product, touch: true</code> should be enough.</p> <p>More on <code>touch</code> below this line:</p> <hr> <p><a href="http://apidock.com/rails/ActiveRecord/Persistence/touch" rel="nofollow">http://apidock.com/rails/ActiveRecord/Persistence/touch</a></p> <blockquote> <p>Please note that no validation is performed and only the after_touch, after_commit and after_rollback callbacks are executed.</p> </blockquote> <p>Also as far as I understand the way <code>touch</code> works, is whenever you update/destroy a record, the one in relation will be <code>touch</code>ed and will only save the record with the updated_at/on attributes set to the current time, nothing more than this. </p> <hr> <p>From <strong>Active Record Callbacks</strong> <a href="http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html" rel="nofollow">http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html</a></p> <blockquote> <p>Additionally, an after_touch callback is triggered whenever an object is touched.</p> </blockquote> <p>so you can use this callback in product model to do whatever you need when an <code>image_product</code> will be destroyed/updated.</p> <hr> <p>From <strong>ActiveRecord::Associations::ClassMethods</strong> <a href="http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html" rel="nofollow">http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html</a></p> <blockquote> <p>:touch If true, the associated object will be touched (the updated_at/on attributes set to now) when this record is either saved or destroyed. If you specify a symbol, that attribute will be updated with the current time in addition to the updated_at/on attribute.</p> </blockquote>