natdeanlewissoftwire
8 months ago
4 changed files with 24 additions and 10 deletions
@ -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…
Reference in new issue