mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
The single query was producing a tremendously large ActiveRecord allocation. While this isn't nearly as cool as one query, it's still a significant reduction in SQL trips, and now has the bonus of only loading what is actually going to be displayed.
16 lines
506 B
Text
16 lines
506 B
Text
.row
|
|
.col-md-12
|
|
%h3.text-center Tracks
|
|
.row.row-centered
|
|
- tracks.each do |track|
|
|
.col-md-3.col-sm-3.col-centered.col-top.track
|
|
.thumbnail
|
|
.caption
|
|
%h3.text-center
|
|
= track.name
|
|
%p.text-center
|
|
- if track.start_date && track.end_date
|
|
= date_string(track.start_date, track.end_date)
|
|
- if track.room
|
|
In #{track.room.name}
|
|
= markdown truncate(track.description, length: 200, separator: ' ')
|