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

Issues with the Latest Rails 7.1.3.2 Not Working Properly #26

Open
juri-t opened this issue Feb 27, 2024 · 0 comments
Open

Issues with the Latest Rails 7.1.3.2 Not Working Properly #26

juri-t opened this issue Feb 27, 2024 · 0 comments

Comments

@juri-t
Copy link

juri-t commented Feb 27, 2024

I am encountering an issue with Rails version 7.1.3.2, where certain expected behaviors are not functioning as anticipated. Specifically, the use of ActiveRecord::Base.connection.execute seems to trigger the proxy execution correctly, as demonstrated below:

irb(main):001> ActiveRecord::Base.connection.execute('select * from users limit 1')
   [writing] (3.9ms)  select * from users limit 1

However, when attempting to use other ActiveRecord methods such as find or where, the proxy does not appear to be executed. For instance:

irb(main):003> User.find(1)
  User Load (1.4ms)  SELECT `users`.`id`, ...

Upon reviewing the changes made to Rails, it seems that the internal call implementation within execute has been modified to something like internal_execute. This alteration can be observed in the following commit: rails/rails@63c0d6b#diff-88e231c48eb5559ac3be58a024b019e86f7c74d388f5d49fac3f4e47bf851cc6

It is my concern that these changes may have inadvertently affected the ability to execute hooks within execute. I am seeking guidance or confirmation on whether this behavior is indeed a result of the recent changes, and if so, how it might be addressed or worked around.

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

No branches or pull requests

1 participant