Only show published trips

This commit is contained in:
2023-06-11 13:16:26 +10:00
parent 5458aab14b
commit 0776283aae
2 changed files with 5 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ module Adamantium
def list
trips
.published
.order(:start_date)
.reverse
.to_a

View File

@@ -12,6 +12,10 @@ module Adamantium
end
auto_struct(true)
def published
where(self[:start_date] <= Time.now)
end
end
end
end