Move calendar scraping to a model method
This commit is contained in:
@@ -24,10 +24,9 @@
|
||||
<th colspan="4" scope="colgroup" class="bg-gray-50 py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Week <%= week_number %></th>
|
||||
</tr>
|
||||
|
||||
<% lectures.each do |lecture| %>
|
||||
<% lectures.reject(&:cancelled).each do |lecture| %>
|
||||
<tr class="<%= class_names({
|
||||
'lecture-future': lecture.start_time.future?,
|
||||
'bg-slate-200': lecture.cancelled,
|
||||
'bg-green-100': lecture.attendance.present?,
|
||||
}) %>">
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
|
||||
|
||||
Reference in New Issue
Block a user