Fix column type-detection bug in `where_object_changes`
This commit is contained in:
parent
cf00b27940
commit
c7efd62fe2
|
@ -171,7 +171,7 @@ module PaperTrail
|
||||||
if columns_hash["object_changes"].type == :jsonb
|
if columns_hash["object_changes"].type == :jsonb
|
||||||
args.each { |field, value| args[field] = [value] }
|
args.each { |field, value| args[field] = [value] }
|
||||||
where("object_changes @> ?", args.to_json)
|
where("object_changes @> ?", args.to_json)
|
||||||
elsif columns_hash["object"].type == :json
|
elsif columns_hash["object_changes"].type == :json
|
||||||
predicates = []
|
predicates = []
|
||||||
values = []
|
values = []
|
||||||
args.each do |field, value|
|
args.each do |field, value|
|
||||||
|
|
Loading…
Reference in New Issue