Only show published trips
This commit is contained in:
@@ -10,6 +10,7 @@ module Adamantium
|
|||||||
|
|
||||||
def list
|
def list
|
||||||
trips
|
trips
|
||||||
|
.published
|
||||||
.order(:start_date)
|
.order(:start_date)
|
||||||
.reverse
|
.reverse
|
||||||
.to_a
|
.to_a
|
||||||
|
@@ -12,6 +12,10 @@ module Adamantium
|
|||||||
end
|
end
|
||||||
|
|
||||||
auto_struct(true)
|
auto_struct(true)
|
||||||
|
|
||||||
|
def published
|
||||||
|
where(self[:start_date] <= Time.now)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user