diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-01 19:26:25 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-01 19:26:25 +0200 |
| commit | 9b442b69d363d47162a4d499c5184a3c394b75dc (patch) | |
| tree | de8fe1160937487513fc36c2e4afef76b4eb08fb /app/controllers/assets_controller.rb | |
| parent | c2d48649f8c907e7716a714ddb1261144013d9be (diff) | |
Report validation failures without the exception preamble
Diffstat (limited to 'app/controllers/assets_controller.rb')
| -rw-r--r-- | app/controllers/assets_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/assets_controller.rb b/app/controllers/assets_controller.rb index 03780c69..801e0968 100644 --- a/app/controllers/assets_controller.rb +++ b/app/controllers/assets_controller.rb | |||
| @@ -94,7 +94,7 @@ class AssetsController < ApplicationController | |||
| 94 | format.xml { head :ok } | 94 | format.xml { head :ok } |
| 95 | end | 95 | end |
| 96 | rescue ActiveRecord::RecordInvalid => e | 96 | rescue ActiveRecord::RecordInvalid => e |
| 97 | flash[:error] = e.message | 97 | flash[:error] = e.record.errors.full_messages.to_sentence |
| 98 | respond_to do |format| | 98 | respond_to do |format| |
| 99 | format.html { redirect_to(asset_path(@asset)) } | 99 | format.html { redirect_to(asset_path(@asset)) } |
| 100 | format.xml { head :forbidden } | 100 | format.xml { head :forbidden } |
