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

Fix: Adjust wrong number of arguments #185

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

dlanileonardo
Copy link
Contributor

Fix for Issue #183 (Wrong number of arguments in the replace_bind_variables method)

Description:
I have implemented a fix for the issue related to the "wrong number of arguments" error in the replace_bind_variables method. This adjustment specifically addresses compatibility with Rails version 7.2 and above.

If any adjustments are needed, I am available to help.

This pull request includes changes to the lib/motor/queries/run_query.rb file to improve the handling of SQL statements by passing the database connection as an argument. The most important changes are:

Improvements to SQL statement normalization:

  • lib/motor/queries/run_query.rb: Modified the normalize_statement_for_sql method to accept a conn parameter and updated its implementation to conditionally include the connection based on the Rails version.

Enhancements to query execution:

@itsameandrea
Copy link

@dlanileonardo thanks a lot for this! You beat me to it by a lot 🙃

Hope it gets merged in and a release cut out soon 🤞

@omohokcoj omohokcoj merged commit 40d2c25 into motor-admin:master Nov 30, 2024
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.

3 participants