Commit 00092387 authored by Peter Leitzen's avatar Peter Leitzen

Use record's primary key instead of hardcoded `id`

Enable caching for records which primary key is not `id`.
parent 1b3affaf
......@@ -12,7 +12,7 @@ class ReactiveCachingWorker
end
return unless klass
klass.find_by(id: id).try(:exclusively_update_reactive_cache!, *args)
klass.find_by(klass.primary_key => id).try(:exclusively_update_reactive_cache!, *args)
end
# rubocop: enable CodeReuse/ActiveRecord
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment