remored the trailling put and the format validation
This commit is contained in:
parent
5065f620a2
commit
3032b0ae1c
@ -34,7 +34,6 @@ class FormsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def notification
|
def notification
|
||||||
puts ''
|
|
||||||
@form = current_user.forms.find_by!(token: params[:id])
|
@form = current_user.forms.find_by!(token: params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ class Form < ApplicationRecord
|
|||||||
validates :airtable_api_key, presence: { if: :airtable? }
|
validates :airtable_api_key, presence: { if: :airtable? }
|
||||||
validates :airtable_app_key, presence: { if: :airtable? }
|
validates :airtable_app_key, presence: { if: :airtable? }
|
||||||
validates :airtable_table, presence: { if: :airtable? }
|
validates :airtable_table, presence: { if: :airtable? }
|
||||||
validates :notify_email, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, on: :update }
|
validates :notify_email, presence: true, on: :update
|
||||||
# TODO: use counter_cache option on association
|
# TODO: use counter_cache option on association
|
||||||
def submissions_count
|
def submissions_count
|
||||||
@submissions_count ||= submissions.count
|
@submissions_count ||= submissions.count
|
||||||
|
Loading…
x
Reference in New Issue
Block a user