Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Update gem to support newer Rails versions #8

Open
aaronkelton opened this issue Apr 11, 2023 · 1 comment
Open

Update gem to support newer Rails versions #8

aaronkelton opened this issue Apr 11, 2023 · 1 comment

Comments

@aaronkelton
Copy link

I'm on Rails 6.1.7.3. Using this gem, it appears that only update_all is still working:

[9] pry(main)> Appointment.update_all(status: 'Hooked')
DEBUG 2023-04-11 18:40:38 +0000   Appointment Update All (12.3ms)  UPDATE "appointments" SET "status" = $1, "updated_at" = $2  [["status", "Hooked"], ["updated_at", "2023-04-11 18:40:38.171631"]]
=> 37
[10] pry(main)> Appointment.update_all(status: 'Booked')
DEBUG 2023-04-11 18:40:56 +0000   Appointment Update All (12.4ms)  UPDATE "appointments" SET "status" = $1, "updated_at" = $2  [["status", "Booked"], ["updated_at", "2023-04-11 18:40:56.788342"]]
=> 37
[11] pry(main)> ActiveRecord::UpdatedAt.disable { Appointment.update_all(status: 'Hooked') }
DEBUG 2023-04-11 18:41:35 +0000   Appointment Update All (8.7ms)  UPDATE "appointments" SET "status" = $1  [["status", "Hooked"]]
=> 37
[12] pry(main)> ActiveRecord::UpdatedAt.disable { Appointment.update_all(status: 'Booked') }
DEBUG 2023-04-11 18:41:42 +0000   Appointment Update All (13.2ms)  UPDATE "appointments" SET "status" = $1  [["status", "Booked"]]
=> 37

Do you know how much effort it would take to get update_column and update_columns working too?

@aaronkelton
Copy link
Author

If newrelic is no longer an issue, the prepend way worked on my fork. I wonder if we can just use that now. 🤔

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

No branches or pull requests

1 participant