forgeplus/app/models/applied_project.rb

10 lines
260 B
Ruby
Raw Permalink Normal View History

2020-03-09 00:40:16 +08:00
class AppliedProject < ApplicationRecord
belongs_to :user
belongs_to :project
has_many :applied_messages, as: :applied, dependent: :destroy
has_many :forge_activities, as: :forge_act, dependent: :destroy
scope :pending, -> { where(status: 0) }
end