grantcallendar/app/models/project.rb

24 lines
903 B
Ruby

# frozen_string_literal: true
# Project
class Project < ApplicationRecord
default_scope { order(prio: :asc) }
# == Constants ============================================================
# == Attributes ===========================================================
# == Extensions ===========================================================
# == Relationships ========================================================
# == Validations ==========================================================
validates :name, presence: true
# == Scopes ===============================================================
scope :by_ids, ->(val) { where(id: val) }
# == Callbacks ============================================================
# == Class Methods ========================================================
# == Instance Methods =====================================================
end