Add demo page

The demo page shows a form and an embedded google sheet side by side.
The form needs be be configured with a DEMO_FORM_ID environment variable.
This commit is contained in:
bumi committed 2020-04-12 01:01:28 +02:00
1 parent e68d4941f1
commit e46e68cc22
10 files changed
+163 -18

No files matched your search

+2 -2
View File
@@ -13,11 +13,11 @@ class Form < ApplicationRecord
# TODO: use counter_cache option on association
def submissions_count
submissions.count
@submissions_count ||= submissions.count
end
def last_submission_date
submissions.order(created_at: :desc).first&.created_at
@last_submission_date ||= submissions.order(created_at: :desc).first&.created_at
end
def deactivate!(reason = nil)