From 9b442b69d363d47162a4d499c5184a3c394b75dc Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 1 Aug 2026 19:26:25 +0200 Subject: Report validation failures without the exception preamble --- app/controllers/assets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/assets_controller.rb') 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 format.xml { head :ok } end rescue ActiveRecord::RecordInvalid => e - flash[:error] = e.message + flash[:error] = e.record.errors.full_messages.to_sentence respond_to do |format| format.html { redirect_to(asset_path(@asset)) } format.xml { head :forbidden } -- cgit v1.3