Browse Source

Change visible scope to also show old bulk uploads before processed attribute

pull/2653/head
Manny Dinssa 2 years ago
parent
commit
8657344d3f
  1. 2
      app/models/bulk_upload.rb

2
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)) }

Loading…
Cancel
Save