Module: PaperTrail::Reifiers::HasOne Private
- Defined in:
- lib/paper_trail/reifiers/has_one.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Reify a single has_one association of model.
Class Method Summary collapse
Class Method Details
.reify(assoc, model, options, transaction_id) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
8 9 10 11 12 13 14 15 16 |
# File 'lib/paper_trail/reifiers/has_one.rb', line 8 def reify(assoc, model, , transaction_id) version = load_version_for_has_one(assoc, model, transaction_id, [:version_at]) return unless version if version.event == "create" create_event(assoc, model, ) else noncreate_event(assoc, model, , version) end end |