1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib
Henrik Nyh e87608e355 Use safer 'destroy!' in controller scaffolds
The old code does

    @foo.destroy
    redirect_to foo_url, notice: "Foo was successfully destroyed."

which would incorrectly state the record was destroyed even if prevented
by a `before_destroy` callback.

The new version would raise.
2022-01-20 16:46:07 +00:00
..
minitest
rails Use safer 'destroy!' in controller scaffolds 2022-01-20 16:46:07 +00:00
rails.rb Delay loading Zeitwerk 2022-01-05 12:59:49 +01:00