added the notification email method
This commit is contained in:
@@ -17,9 +17,7 @@ class FormsController < ApplicationController
|
||||
|
||||
def index
|
||||
@forms = current_user.forms
|
||||
if @forms.empty?
|
||||
redirect_to new_form_url
|
||||
end
|
||||
redirect_to new_form_url if @forms.empty?
|
||||
end
|
||||
|
||||
def create
|
||||
@@ -33,6 +31,12 @@ class FormsController < ApplicationController
|
||||
|
||||
def edit
|
||||
@form = current_user.forms.find_by!(token: params[:id])
|
||||
puts "===========#{@form.notify_email}======================="
|
||||
end
|
||||
|
||||
def notification
|
||||
puts ''
|
||||
@form = current_user.forms.find_by!(token: params[:id])
|
||||
end
|
||||
|
||||
def update
|
||||
@@ -55,6 +59,6 @@ class FormsController < ApplicationController
|
||||
private
|
||||
|
||||
def form_params
|
||||
params.require(:form).permit(:title, :thank_you_url, :backend_name, :google_spreadsheet_sheet, :airtable_table, :airtable_api_key, :airtable_app_key)
|
||||
params.require(:form).permit(:title, :thank_you_url, :backend_name, :google_spreadsheet_sheet, :airtable_table, :airtable_api_key, :airtable_app_key, :notify_email)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user