Skip to content

Commit

Permalink
Fix version check in ActiveRecord adapter
Browse files Browse the repository at this point in the history
Fix version check in ActiveRecord adapter: the "target" version for comparison needs to be a string.

Fixes: 
ArgumentError: comparison of Gem::Version with 7.2 failed
  • Loading branch information
mihaimuntenas authored Sep 13, 2024
1 parent ddd7cf6 commit 36a9df2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/graphiti/adapters/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def destroy(model_instance)
end

def close
if ::ActiveRecord.version > 7.2
if ::ActiveRecord.version > '7.2'
::ActiveRecord::Base.connection_handler.clear_active_connections!
else
::ActiveRecord::Base.clear_active_connections!
Expand Down

0 comments on commit 36a9df2

Please sign in to comment.