mirror of
https://github.com/usetrmnl/terminus.git
synced 2026-08-13 14:29:27 -07:00
Necessary to reduce confusion and be consistent with existing tables. Milestone: minor
15 lines
310 B
Ruby
15 lines
310 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Terminus
|
|
module Relations
|
|
# The firmware relation.
|
|
class Firmware < DB::Relation
|
|
schema :firmware, infer: true
|
|
|
|
def by_version_desc
|
|
order Sequel.desc(Sequel.function(:string_to_array, :version, ".").cast("int[]"))
|
|
end
|
|
end
|
|
end
|
|
end
|