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.
This commit is contained in:
parent
754d201b01
commit
fa55224163
26 changed files with 181 additions and 165 deletions
|
|
@ -2,7 +2,7 @@
|
|||
.col-md-12
|
||||
%h3.text-center Booths
|
||||
.row.row-centered
|
||||
- conference.confirmed_booths.to_a.sort_by!(&:title).each do |booth|
|
||||
- booths.each do |booth|
|
||||
.col-md-2.col-sm-2.col-centered.col-top.booth
|
||||
%a.thumbnail{ href: '#',
|
||||
data: { toggle: 'modal', target: "#modal-booth-#{booth.id}" } }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue