Add completion: order contestants by name + add email if present
This commit is contained in:
@@ -28,6 +28,14 @@ class Contestant < ApplicationRecord
|
||||
validates :name, presence: true
|
||||
validates :time_seconds, presence: true
|
||||
|
||||
def form_name
|
||||
if email.present?
|
||||
"#{name} - #{email}"
|
||||
else
|
||||
name
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def initialize_time_seconds_if_empty
|
||||
|
Reference in New Issue
Block a user