impressionist icon indicating copy to clipboard operation
impressionist copied to clipboard

How to create model callbacks?

Open karandocs opened this issue 4 years ago • 1 comments

I'm using active record ORM. Is there any way to create callbacks for impression model? I want to run a background job on after create callback.

karandocs avatar Oct 22 '20 18:10 karandocs

I need to do this as well. Has anyone been able to. I tried making a basic model like below but it seems to get ignored by Rails.

class Impression < ApplicationRecord
	belongs_to :thing, optional: true
end

codeundercoverdev avatar Nov 12 '20 17:11 codeundercoverdev