proper upcoming events
This commit is contained in:
parent
c959701a4d
commit
e5d17b5c33
2 changed files with 4 additions and 4 deletions
|
@ -7,11 +7,11 @@
|
|||
<div id="homepage">
|
||||
<div class="tile is-vertical is-ancestor">
|
||||
<div class="tile is-parent is-12">
|
||||
<%= render '/partials/_tile.*', article: all_events[0], htmlclass: "highlighted", small_text: "Upcoming event" %>
|
||||
<%= render '/partials/_tile.*', article: upcoming_events[0], htmlclass: "highlighted", small_text: "Upcoming event" %>
|
||||
</div>
|
||||
<div class="tile">
|
||||
<div class="tile is-parent is-4">
|
||||
<%= render '/partials/_tile.*', article: all_events[1], small_text: "Upcoming event" %>
|
||||
<%= render '/partials/_tile.*', article: upcoming_events[1], small_text: "Upcoming event" %>
|
||||
</div>
|
||||
<div class="tile is-parent is-4">
|
||||
<div class="tile is-child box centering">
|
||||
|
|
|
@ -5,11 +5,11 @@ module EventsHelper
|
|||
end
|
||||
|
||||
def upcoming_events
|
||||
all_events.reject { |x| x[:time] < Date.today }
|
||||
all_events.reject { |x| x[:time] <= Date.today }
|
||||
end
|
||||
|
||||
def past_events
|
||||
all_events.reject { |x| x[:time] >= Date.today }
|
||||
all_events.reject { |x| x[:time] > Date.today }
|
||||
end
|
||||
|
||||
def grouped_events
|
||||
|
|
Loading…
Reference in a new issue