Form to create airtable and google sheets forms
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user