From 49c59f1d7a5662d4c3cd2889570cdc18f1ce9fb9 Mon Sep 17 00:00:00 2001 From: Rahul Date: Sun, 21 Jul 2019 20:37:53 +0530 Subject: [PATCH] add render in update method render edit is added so that error and flash message could trigger after the form is submitted. --- app/controllers/booths_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/booths_controller.rb b/app/controllers/booths_controller.rb index df535459..98556101 100644 --- a/app/controllers/booths_controller.rb +++ b/app/controllers/booths_controller.rb @@ -43,6 +43,7 @@ class BoothsController < ApplicationController notice: 'Booth successfully updated!' else flash.now[:error] = "Booth could not be updated. #{@booth.errors.full_messages.to_sentence}." + render :edit end end