mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
For belongs_to reify, use correct foreign_key
This commit is contained in:
parent
7332d5cc87
commit
cec9e0ab58
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ module PaperTrail
|
||||||
class << self
|
class << self
|
||||||
# @api private
|
# @api private
|
||||||
def reify(assoc, model, options, transaction_id)
|
def reify(assoc, model, options, transaction_id)
|
||||||
id = model.send(assoc.association_foreign_key)
|
id = model.send(assoc.foreign_key)
|
||||||
version = load_version(assoc, id, transaction_id, options[:version_at])
|
version = load_version(assoc, id, transaction_id, options[:version_at])
|
||||||
record = load_record(assoc, id, options, version)
|
record = load_record(assoc, id, options, version)
|
||||||
model.send("#{assoc.name}=".to_sym, record)
|
model.send("#{assoc.name}=".to_sym, record)
|
||||||
|
|
Loading…
Reference in a new issue