Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
george-ma committed Nov 7, 2024
1 parent f4d9361 commit 518e8c6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion activerecord/lib/active_record/future_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,15 @@ def exec_query(*, **)

class InsertFixtures < FutureResult # :nodoc:
private
def exec_query(connection, *args, **kwargs)
def exec_query(connection, *args, **kwargs)
# If the first arg is an array, treat it as multiple statements
if args.first.is_a?(Array)
statements = args.shift
connection.send(:execute_batch, statements, args.first || "Fixtures Load")
else
connection.exec_fixtures_insert(*args, **kwargs)
end
end
end
end
end

0 comments on commit 518e8c6

Please sign in to comment.