Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test when using MySQL exec_query returns ActiveRecord::Result all… #34521

Merged
merged 1 commit into from
Nov 26, 2018

Conversation

al3rez
Copy link

@al3rez al3rez commented Nov 25, 2018

Fixes #34506 - When running exec_query with INSERT (or other write commands), MySQL returns ActiveRecord::Result

@al3rez
Copy link
Author

al3rez commented Nov 25, 2018

I wanted to come up with a more creative idea to return an empty result but I thought maybe it'd be over-engineering. So I just used simple if/else statements to avoid complexity.

When running `exec_query` with `INSERT` (or other write commands), MySQL
returns `ActiveRecord::Result`.
Copy link
Member

@eileencodes eileencodes left a comment

Choose a reason for hiding this comment

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

Thanks @azbshiri!

@eileencodes eileencodes merged commit 0fe258d into rails:master Nov 26, 2018
@al3rez
Copy link
Author

al3rez commented Nov 26, 2018

Any time @eileencodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants