mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04: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
|
redirect_to edit_vehicle_path
|
||||||
end
|
end
|
||||||
#show any errors anyways
|
#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
|
rescue ActiveRecord::RecordNotFound
|
||||||
render_404
|
render_404
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user