JackDanger/permanent_records — pull request #27 by tanordheim (2013-03-15 15:55:13+00:00)
Title: Change to public run_callbacks API

Hi!

It seems the `_run_destroy_callbacks` method is no longer present in Rails 4 (and potentially earlier versions as well). It's advised to always run the public API methods in the Rails API when doing things like this (in this case `run_callbacks(:*)`), so I changed the implementation in use in this gem.

This should also fix issue #25.

All tests are green locally for me except `PermanentRecords#destroy with dependent records as default scope with :has_many cardinality comments.size` in `spec/permanent_records_spec.rb:119` - that one was broken before I changed any code, however, so it's probably something else causing that.