|
|
|
@@ -22,7 +22,7 @@ class ApplySignature < ApplicationRecord |
|
|
|
has_many :attachments, as: :container, dependent: :destroy |
|
|
|
|
|
|
|
scope :with_user_id, -> (user_id) {where(user_id: user_id)} |
|
|
|
scope :with_status, -> (status) {where(status: status) if status.present?} |
|
|
|
scope :with_status, -> (status) {where(status: status) if status.present? && status != "all"} |
|
|
|
|
|
|
|
validates :project_id, uniqueness: {scope: :user_id} |
|
|
|
|
|
|
|
|