From d70ce7b156878451347c7a1965795153fd614b98 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Fri, 6 May 2016 12:10:45 -0400 Subject: [PATCH] Update vehicles_controller.rb --- app/controllers/vehicles_controller.rb | 1 + 1 file changed, 1 insertion(+) 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