Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create model callbacks? #291

Open
karandocs opened this issue Oct 22, 2020 · 1 comment
Open

How to create model callbacks? #291

karandocs opened this issue Oct 22, 2020 · 1 comment

Comments

@karandocs
Copy link

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.

@codeundercoverdev
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants