impressionist icon indicating copy to clipboard operation
impressionist copied to clipboard

Deleting is_impressionable model objects

Open robinsk1 opened this issue 15 years ago • 3 comments

Deleting is_impressionable model objects is leaving orphaned records in the Impressions table

robinsk1 avatar Aug 22 '11 15:08 robinsk1

same problem here, solved using:

has_many :impressions, :as => :impressionable, :dependent => :destroy

on each model but it would be nice if impressionist would take care of it

francesc avatar Oct 07 '11 08:10 francesc

I am planning on pushing an update to impressionist sometime next week with a fix for this and a few other features related to impression counts on the model. francesc, thanks for sharing your solution. If you have tests for this, can you fork and submit a pull request?

johnmcaliley avatar Oct 07 '11 13:10 johnmcaliley

Done. See issue #16 (I didn't know how to add the pull request to this issue),

georgmittendorfer avatar Dec 13 '11 13:12 georgmittendorfer