Update trips

This commit is contained in:
2023-05-10 20:39:22 +10:00
parent c4223aab31
commit 2fce0d3967
12 changed files with 384 additions and 63 deletions

View File

@@ -4,12 +4,20 @@ module Admin
commands :create
def list
trips.order(:start_date).to_a
trips
.order(:start_date)
.to_a
end
def fetch(id)
trips.where(id: id).one
end
def update(id, trip)
trips
.where(id: id)
.update(trip)
end
end
end
end