Fix QR codes generation on 'finalize_import' action
This commit is contained in:
@@ -28,7 +28,7 @@ class Contestant < ApplicationRecord
|
|||||||
has_and_belongs_to_many :categories
|
has_and_belongs_to_many :categories
|
||||||
|
|
||||||
before_validation :initialize_time_seconds_if_empty
|
before_validation :initialize_time_seconds_if_empty
|
||||||
before_commit :generate_qrcode, on: :create
|
before_save :generate_qrcode, if: -> { !qrcode.present? }
|
||||||
|
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
validates :time_seconds, presence: true
|
validates :time_seconds, presence: true
|
||||||
|
|||||||
Reference in New Issue
Block a user