No commit activity in last 3 years
No release in over 3 years
Delayed Job integration for the touch option of ActiveRecord belongs_to association
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0

Runtime

 Project Readme

delayed_touch_associations

Delayed Job integration for the touch option of ActiveRecord belongs_to association.

This gem delays all the touch callbacks defined by the touch option of all the belongs_to associations in the models it's included. It calls the delay method defined in delayed_job when the callback is triggered, minimizing the time it takes to save the record.

Installation

Add to your Gemfile:

    gem 'delayed_touch_associations'

Usage

Inside your ActiveRecord model:

    include DelayedTouchAssociations

Be sure to include the module AFTER all the associations are defined.