educative.io

Destroy_by not working due to Rails being 5 instead of 6

Is it possible to upgrade Ruby on Rails to 6? In Update and Delete you introduce destroy_by but that is not usable in Rails 5. It gets introduced in Rails 6.

https://apidock.com/rails/v6.0.0/ActiveRecord/Relation/delete_by

Hey @ramen

Yes, destroy_by is available in Rails 6, not Rails 5. I have updated the lesson.
Moreover, do you want to upgrade only in that specific example or want the whole course with Rails 6?

Happy learning,

Hey @Shaheryaar_Kamal,

I would update the whole course to Rails 6. If possible, Rails 7 whenever it gets released.

Hey @ramen
Your opinion is noted and will be forwarded to the relevant team.

Happy learning,