2016-03-05 22:07:32 +00:00
|
|
|
require "active_support/concern"
|
2014-11-03 05:38:48 +00:00
|
|
|
|
|
|
|
module PaperTrail
|
2016-04-09 05:08:34 +00:00
|
|
|
# Functionality for `PaperTrail::VersionAssociation`. Exists in a module
|
|
|
|
# for the same reasons outlined in version_concern.rb.
|
2014-11-03 05:38:48 +00:00
|
|
|
module VersionAssociationConcern
|
|
|
|
extend ::ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
|
|
|
belongs_to :version
|
|
|
|
|
2015-11-02 04:59:02 +00:00
|
|
|
if PaperTrail.active_record_protected_attributes?
|
|
|
|
attr_accessible :version_id, :foreign_key_name, :foreign_key_id
|
|
|
|
end
|
2014-11-03 05:38:48 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|