charlotte-ruby / impressionist

Rails Plugin that tracks impressions and page views
MIT License
1.54k stars 311 forks source link

Option for dependent: :destroy #230

Closed pwgustafson closed 7 years ago

pwgustafson commented 7 years ago

Hello @johnmcaliley

Thanks for providing a nice and simple gem for tracking impressions. I was struggling to find something that wasn't over complicated - so I was happy to come across this.

I did however need the ability to soft delete impressionable records, and if they were restored that the impressions also still be available. I have added that ability in this PR.

I am fairly new to contributing to open source (and ruby) - so let me know if there is anything that I should be doing differently. I wanted a better way to check the options within the define_association method, but haven't worked much with modules so I couldn't find a way to access an instance variable from within that method. I might keep trying and push an update if I find a better way.

Thanks

jgrau commented 7 years ago

@pwgustafson Thanks for the PR. I know this is old but I would love to get it merged.

As @johnmcaliley requested, would you be up for adding a description of this option to the readme?

jgrau commented 7 years ago

I am closing this as stale but please feel free to reopen, add the documentation and rebase onto master (so we can a valid test suite run) if you're up for it