class CastingCall < ApplicationRecord belongs_to :project has_many :casting_submissions, dependent: :destroy has_secure_token def status if cancelled? "Cancelled" else "Active" end end def cancelled? self.cancelled_at.present? end end