add render in update method

render edit is added so that error and flash message could trigger after the form is submitted.
This commit is contained in:
Rahul 2019-07-21 20:37:53 +05:30
parent 12f10c7dcd
commit 49c59f1d7a

View file

@ -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