Add Airtable demo
This commit is contained in:
@@ -1 +1,3 @@
|
||||
DEMO_FORM = Form.find_by(id: ENV['DEMO_FORM_ID'])
|
||||
GOOGLE_DEMO_FORM = Form.find_by(id: ENV['GOOGLE_DEMO_FORM_ID'])
|
||||
AIRTABLE_DEMO_FORM = Form.find_by(id: ENV['AIRTABLE_DEMO_FORM_ID'])
|
||||
AIRTABLE_DEMO_EMBED_URL = ENV['AIRTABLE_DEMO_EMBED_URL']
|
||||
|
||||
@@ -6,7 +6,9 @@ Rails.application.routes.draw do
|
||||
resources :submissions
|
||||
end
|
||||
# short link for submission file uploads
|
||||
get '/s/:form_id/:submission_id/:id' => 'file_uploads#show', as: :file_upload
|
||||
# we add the filename as part of the URL which allows e.g. Airtable to identify and name the file properly
|
||||
# the constraint makes sure that a . (dot) can be in the filename. e.g. cat.jpg
|
||||
get '/s/:form_id/:submission_id/:id(/:filename)' => 'file_uploads#show', as: :file_upload, constraints: { filename: /[^\/]+/ }
|
||||
|
||||
# form post url to save new submissions
|
||||
post '/s/:form_id' => 'submissions#create', as: :submission
|
||||
@@ -21,7 +23,7 @@ Rails.application.routes.draw do
|
||||
get '/logout' => 'sessions#destroy', as: :logout
|
||||
get '/auth' => 'sessions#auth', as: :auth
|
||||
|
||||
get '/demo' => 'home#demo', as: :demo
|
||||
get '/demo(/:backend)' => 'home#demo', as: :demo
|
||||
get '/contact' => 'home#contact', as: :contact
|
||||
get '/help', to: redirect('https://www.notion.so/Tinyforms-Help-Center-04f13b5908bc46cfb4283079a3cb1149')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user