mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
Only show error flash if errors are not empty
This commit is contained in:
@@ -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