[FIX]
This commit is contained in:
parent
ef327f2994
commit
cfa14fff9d
|
@ -69,7 +69,7 @@ class ApplySignaturesController < ApplicationController
|
|||
end
|
||||
|
||||
def status
|
||||
params.fetch(:status, "")
|
||||
params.fetch(:status, "all")
|
||||
end
|
||||
|
||||
def require_owner
|
||||
|
|
|
@ -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}
|
||||
|
||||
|
|
Loading…
Reference in New Issue