From 8657344d3f5f55e26428d739ca3529b0532599bd Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Fri, 27 Sep 2024 17:43:21 +0100 Subject: [PATCH] Change visible scope to also show old bulk uploads before processed attribute --- app/models/bulk_upload.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/bulk_upload.rb b/app/models/bulk_upload.rb index 5f905893e..7b34b4e81 100644 --- a/app/models/bulk_upload.rb +++ b/app/models/bulk_upload.rb @@ -12,7 +12,7 @@ class BulkUpload < ApplicationRecord after_initialize :generate_identifier, unless: :identifier - scope :visible, -> { where(processed: true) } + scope :visible, -> { where.not(processed: false) } scope :search_by_filename, ->(filename) { where("filename ILIKE ?", "%#{filename}%") } scope :search_by_user_name, ->(name) { where(user_id: User.where("name ILIKE ?", "%#{name}%").select(:id)) }