Browse Source

CLDC-2470: Order bulk upload error rows numerically (#2381)

CLDC-2831-page-load^2 v0.4.36
Rachael Booth 8 months ago committed by GitHub
parent
commit
d1ad0021a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/models/bulk_upload_error.rb

2
app/models/bulk_upload_error.rb

@ -1,7 +1,7 @@
class BulkUploadError < ApplicationRecord class BulkUploadError < ApplicationRecord
belongs_to :bulk_upload belongs_to :bulk_upload
scope :order_by_row, -> { order(row: :asc) } scope :order_by_row, -> { order("row::integer ASC") }
scope :order_by_cell, -> { order(Arel.sql("LPAD(cell, 10, '0')")) } scope :order_by_cell, -> { order(Arel.sql("LPAD(cell, 10, '0')")) }
scope :order_by_col, -> { order(Arel.sql("LPAD(col, 10, '0')")) } scope :order_by_col, -> { order(Arel.sql("LPAD(col, 10, '0')")) }
end end

Loading…
Cancel
Save