mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Every time a new track, event type or difficulty level is created, the color picker has a different color by default. Closes https://github.com/openSUSE/osem/issues/1077
7 lines
195 B
Ruby
7 lines
195 B
Ruby
class DifficultyLevel < ActiveRecord::Base
|
|
belongs_to :program
|
|
has_many :events, dependent: :nullify
|
|
|
|
validates :title, presence: true
|
|
validates :color, format: /\A#[0-9a-fA-F]{6}\z/
|
|
end
|