Files
old-holivud2/app/models/casting_call.rb
2020-07-17 04:50:04 +02:00

19 lines
280 B
Ruby

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