diff --git a/app/controllers/vehicles_controller.rb b/app/controllers/vehicles_controller.rb index 8a501a1..6f35a45 100644 --- a/app/controllers/vehicles_controller.rb +++ b/app/controllers/vehicles_controller.rb @@ -34,6 +34,7 @@ class VehiclesController < ApplicationController @vehicle = Vehicle.new(params[:vehicle]) @vehicle.save! flash[:notice] = "New Vehicle Created" + flash[:error] = @vehicle.errors.full_messages.to_sentence if @vehicle.errors redirect_to @vehicle end