From c0bfcf16a25362038e70e4398ced3acee8c8ffa5 Mon Sep 17 00:00:00 2001 From: Jon Allured Date: Thu, 22 Feb 2024 08:02:10 -0600 Subject: [PATCH] Update weird gift idea controller --- app/controllers/gift_ideas_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/gift_ideas_controller.rb b/app/controllers/gift_ideas_controller.rb index bcab50e..2b4b7d7 100644 --- a/app/controllers/gift_ideas_controller.rb +++ b/app/controllers/gift_ideas_controller.rb @@ -5,12 +5,12 @@ class GiftIdeasController < ApplicationController def update if gift_idea.update(gift_idea_params) - flash.notice = "gift idea updated!" - redirect_to wishlist_path + flash.notice = "Gift Idea updated" else - flash.alert = gift_idea.errors.full_messages - render :edit + flash.alert = gift_idea.errors.full_messages.to_sentence end + + redirect_to wishlist_path end private