Skip to content

Commit

Permalink
Merge pull request #1 from mihaimuntenas/mihaimuntenas-patch-1
Browse files Browse the repository at this point in the history
Update ActiveRecord adapter w/ support for Rails 7.2+
  • Loading branch information
mihaimuntenas authored Sep 11, 2024
2 parents 15ba979 + 4d342f0 commit 0bedcff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/graphiti/adapters/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,11 @@ def destroy(model_instance)
end

def close
::ActiveRecord::Base.clear_active_connections!
if ::ActiveRecord.version > 7.2
::ActiveRecord::Base.connection_handler.clear_active_connections!
else
::ActiveRecord::Base.clear_active_connections!
end
end

def can_group?
Expand Down

0 comments on commit 0bedcff

Please # to comment.