From 5d6ff72ef747981aab273d870a1509b284435d77 Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Fri, 6 May 2016 12:20:00 -0400 Subject: [PATCH] Update vehicles_controller.rb --- app/controllers/vehicles_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/vehicles_controller.rb b/app/controllers/vehicles_controller.rb index 45f5c5a..72d8c28 100644 --- a/app/controllers/vehicles_controller.rb +++ b/app/controllers/vehicles_controller.rb @@ -34,12 +34,12 @@ class VehiclesController < ApplicationController @vehicle = Vehicle.new(params[:vehicle]) if @vehicle.save flash[:notice] = "New Vehicle Created" + redirect_to @vehicle else @customers = Customer.all.order(:name) render :edit end flash[:error] = @vehicle.errors.full_messages.to_sentence if @vehicle.errors - redirect_to @vehicle end # display a specific vehicle