Skip to content

Splat kwargs on #execute#101

Merged
bquorning merged 1 commit intomasterfrom
bquorning.fix-for-rails-7
Dec 23, 2022
Merged

Splat kwargs on #execute#101
bquorning merged 1 commit intomasterfrom
bquorning.fix-for-rails-7

Conversation

@bquorning
Copy link
Copy Markdown
Member

Rails 7 introduced an async keyword argument to the #execute method so we get keyword errors unless we splat in the kwargs:

  # activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb

  def execute(sql, name = nil, async: false)
    raw_execute(sql, name, async: async)
  end

Rails 7 introduced an `async` keyword argument to the `#execute` method
so we get keyword errors unless we splat in the kwargs:

```ruby
  # activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb

  def execute(sql, name = nil, async: false)
    raw_execute(sql, name, async: async)
  end
```
@bquorning bquorning marked this pull request as ready for review December 22, 2022 12:12
@bquorning bquorning requested review from a team as code owners December 22, 2022 12:12
Copy link
Copy Markdown
Contributor

@grosser grosser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@bquorning bquorning merged commit 64d2026 into master Dec 23, 2022
@bquorning bquorning deleted the bquorning.fix-for-rails-7 branch December 23, 2022 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants