diff --git a/lib/paper_trail/version_concern.rb b/lib/paper_trail/version_concern.rb index e6f9e9aa..b8f48138 100644 --- a/lib/paper_trail/version_concern.rb +++ b/lib/paper_trail/version_concern.rb @@ -116,12 +116,12 @@ module PaperTrail # Returns whether the `object` column is using the `json` type supported by PostgreSQL def object_col_is_json? - @object_col_is_json ||= columns_hash['object'].type == :json + @object_col_is_json ||= [:json, :jsonb].include?(columns_hash['object'].type) end # Returns whether the `object_changes` column is using the `json` type supported by PostgreSQL def object_changes_col_is_json? - @object_changes_col_is_json ||= columns_hash['object_changes'].try(:type) == :json + @object_changes_col_is_json ||= [:json, :jsonb].include?(columns_hash['object_changes'].try(:type)) end end