jbuilder icon indicating copy to clipboard operation
jbuilder copied to clipboard

Add missing ':see_other' status code in generated destroy controller method

Open ldeld opened this issue 3 years ago • 1 comments

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 with data-turbo-method='delete')

ldeld avatar Aug 25 '22 18:08 ldeld

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)

ldeld avatar Aug 25 '22 19:08 ldeld