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