diff --git a/app/controllers/forms_controller.rb b/app/controllers/forms_controller.rb index 5fd4648..3d1956b 100644 --- a/app/controllers/forms_controller.rb +++ b/app/controllers/forms_controller.rb @@ -31,7 +31,6 @@ class FormsController < ApplicationController def edit @form = current_user.forms.find_by!(token: params[:id]) - puts "===========#{@form.notify_email}=======================" end def notification @@ -44,7 +43,11 @@ class FormsController < ApplicationController if @form.update(form_params) redirect_to form_url(@form) else - render :edit + if form_params[:notify_email] + render :notification + else + render :edit + end end end