diff --git a/lib/active_touch/touch_job.rb b/lib/active_touch/touch_job.rb index 68793c1..a4f3aae 100644 --- a/lib/active_touch/touch_job.rb +++ b/lib/active_touch/touch_job.rb @@ -2,7 +2,11 @@ module ActiveTouch class TouchJob < ActiveJob::Base def perform(record, association, after_touch) - associated = record.send(association) + if association == 'self' + associated = record + else + associated = record.send(association) + end if associated.is_a? ActiveRecord::Base associated.update_columns(updated_at: record.updated_at) diff --git a/lib/active_touch/version.rb b/lib/active_touch/version.rb index 2e2f95e..4b7d914 100644 --- a/lib/active_touch/version.rb +++ b/lib/active_touch/version.rb @@ -1,3 +1,3 @@ module ActiveTouch - VERSION = '1.0.0' + VERSION = '1.1.0' end