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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user