osem-fcy/app/views/conferences/_highlights.haml
James Mason fa55224163 Break up the one-query-of-doom
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.
2017-12-22 10:48:55 -08:00

19 lines
623 B
Text

.row
.col-md-12
%h3.text-center
Program Highlights
.row
.col-md-12
.row.row-centered
- highlights.each do |event|
- speaker = event.speakers_ordered.first
.col-md-3.col-sm-3.col-centered.col-top.highlights
= link_to(conference_program_proposal_path(conference_id,
event),
class: 'thumbnail') do
= image_tag speaker.gravatar_url(size: 300),
class: ['img-responsive', 'img-circle'],
title: speaker.name
.caption
%h3.text-center= speaker.name
%h4.text-center= event.title