Skip to content
Snippets Groups Projects
Verified Commit 3b417ebb authored by Felix Eckhofer's avatar Felix Eckhofer :man_dancing:
Browse files

Add note

parent b4d7cdbb
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ class Session < ApplicationRecord ...@@ -13,6 +13,7 @@ class Session < ApplicationRecord
scope :future, -> { where(starts_at: Time.now..) } scope :future, -> { where(starts_at: Time.now..) }
validates :ref_id, uniqueness: { scope: :conference_id } validates :ref_id, uniqueness: { scope: :conference_id }
# ref_id is used as part of a path, so make sure its safe
validates :ref_id, format: { with: /\A[0-9a-fA-F-]+\z/, message: "only allows hexadecimal characters and minus" } validates :ref_id, format: { with: /\A[0-9a-fA-F-]+\z/, message: "only allows hexadecimal characters and minus" }
after_update :notify_if_changed after_update :notify_if_changed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment