When scaffolding a model (with rails g scaffold ModelName), the destroy method in the generated controller is missing a 302 status code. Adding this status code is recommended in the Getting Started guide, so it makes sense to add it to the generated controller as well (especially since the not having the status code can cause issues when using a turbo link with data-turbo-method='delete')
Tests failed for rails_head, but I don't believe those failures are related to this PR (the errors also happen when running tests from the main branch)
See https://github.com/rails/rails/pull/45383
When scaffolding a model (with
rails g scaffold ModelName
), the destroy method in the generated controller is missing a 302 status code. Adding this status code is recommended in the Getting Started guide, so it makes sense to add it to the generated controller as well (especially since the not having the status code can cause issues when using a turbo link withdata-turbo-method='delete'
)