Use model accessors explicitly instead of #[]

#660
This commit is contained in:
Artur Beljajev 2018-01-30 19:33:00 +02:00
parent 762f891b84
commit cefa37d081
5 changed files with 6 additions and 6 deletions

View file

@ -67,7 +67,7 @@ module Versions
map do |ver|
o = new(ver.object)
o.version_loader = ver
ver.object_changes.to_h.each { |k, v| o[k]=v[-1] }
ver.object_changes.to_h.each { |k, v| o.public_send("#{k}=", v[-1]) }
o
end
not_in_history = where(id: (ids.to_a - from_history.map(&:id)))