Browse Source

[FIX]

pull/278/head
viletyy 5 years ago
parent
commit
cfa14fff9d
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/controllers/apply_signatures_controller.rb
  2. +1
    -1
      app/models/apply_signature.rb

+ 1
- 1
app/controllers/apply_signatures_controller.rb View File

@@ -69,7 +69,7 @@ class ApplySignaturesController < ApplicationController
end

def status
params.fetch(:status, "")
params.fetch(:status, "all")
end

def require_owner


+ 1
- 1
app/models/apply_signature.rb 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}



Loading…
Cancel
Save