# frozen_string_literal: true # Course class Course < ApplicationRecord # == Constants ============================================================ # == Attributes =========================================================== # == Extensions =========================================================== # == Relationships ======================================================== has_many :weeks, dependent: :destroy # == Validations ========================================================== validates :name, presence: true # == Scopes =============================================================== scope :name_asc, -> { order(:name) } # == Callbacks ============================================================ # == Class Methods ======================================================== # == Instance Methods ===================================================== end