Form to create airtable and google sheets forms

This commit is contained in:
2020-04-25 22:58:03 +02:00
parent 60386cb51e
commit 833de45827
6 changed files with 108 additions and 13 deletions

View File

@@ -5,7 +5,7 @@ class FormsController < ApplicationController
layout 'submission', only: [:form]
def new
@form = current_user.forms.build
@form = current_user.forms.build(backend_name: 'google_sheets')
end
def show
@@ -40,13 +40,12 @@ class FormsController < ApplicationController
end
def form
@form = Form.find_by!(token: params[:id])
end
private
def form_params
params.require(:form).permit(:title, :thank_you_url)
params.require(:form).permit(:title, :thank_you_url, :backend_name, :airtable_table, :airtable_api_key, :airtable_app_key)
end
end