osem-fcy/app/views/conferences/_tickets.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

24 lines
788 B
Text

= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#tickets' } Tickets
- cache [conference, tickets, '#splash#tickets'] do
%section#tickets
.container
.row
.col-md-12.text-center
%h2
Support
= conference.title
.row.row-centered
- tickets.each do |ticket|
.col-md-3.col-sm-3.col-centered.col-top
= link_to(conference_tickets_path(conference.short_title),
class: 'thumbnail') do
.caption
%h3.text-center
= ticket.title
= markdown(ticket.description)
%button.btn-block.btn.btn-lg.btn-success
%i.fa.fa-ticket.fa-fw
= humanized_money_with_symbol(ticket.price)