Module: PaperTrail::ActiveRecordExt::OrDeleted

Extended by:
ActiveSupport::Concern
Defined in:
lib/paper_trail/active_record/or_deleted.rb

Overview

If you include this module into a model, it will automatically add a {association}_or_deleted method for every belongs_to or has_one association that is defined.

Because it reflects on all associations on that model as soon as it is included, make sure to include it after all of your associations are defined.

If you want more control, and don't want it to add anything automatically, you can manually call define_assoc_or_deleted :association for each association that you want to have a {association}_or_deleted method.

If you want it to automatically be added for all assocations on all application models, you can use gem 'active_record_include' like this:

class ApplicationRecord < ActiveRecord::Base include_when_connected PaperTrail::ActiveRecord::OrDeleted

Defined Under Namespace

Modules: ClassMethods