This commit is contained in:
viletyy 2021-01-04 17:52:05 +08:00
parent ef327f2994
commit cfa14fff9d
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ class ApplySignaturesController < ApplicationController
end
def status
params.fetch(:status, "")
params.fetch(:status, "all")
end
def require_owner

View File

@ -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}