mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 01:00:44 -04:00
Only show error flash if errors are not empty
This commit is contained in:
1 parent
8f0ca00b09
commit
1ea27e8511
1 file changed
+1
-1
@@ -84,7 +84,7 @@ class VehiclesController < ApplicationController
|
||||
redirect_to edit_vehicle_path
|
||||
end
|
||||
#show any errors anyways
|
||||
flash[:error] = @vehicle.errors.full_messages.to_sentence if @vehicle.errors
|
||||
flash[:error] = @vehicle.errors.full_messages.to_sentence unless @vehicle.errors.empty?
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user