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

20 lines
787 B
Text

- cache [contact, '#splash#social'] do
%section#social-media
.container
.row
.col-md-12.text-center
- unless contact.facebook.blank?
= link_to "#{ contact.facebook }" do
%i.fa.fa-facebook-square.fa-4x
- unless contact.twitter.blank?
= link_to "#{ contact.twitter }" do
%i.fa.fa-twitter.fa-4x
- unless contact.instagram.blank?
= link_to "#{ contact.instagram }" do
%i.fa.fa-instagram.fa-4x
- unless contact.googleplus.blank?
= link_to "#{ contact.googleplus }" do
%i.fa.fa-google-plus-square.fa-4x
- unless contact.email.blank?
= mail_to "#{ contact.email }" do
%i.fa.fa-envelope-o.fa-4x