Fix column type-detection bug in `where_object_changes`

This commit is contained in:
Jared Beck 2016-12-11 03:25:55 -05:00
parent cf00b27940
commit c7efd62fe2
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ module PaperTrail
if columns_hash["object_changes"].type == :jsonb
args.each { |field, value| args[field] = [value] }
where("object_changes @> ?", args.to_json)
elsif columns_hash["object"].type == :json
elsif columns_hash["object_changes"].type == :json
predicates = []
values = []
args.each do |field, value|