Make sure an empty splash works
This commit is contained in:
parent
b6b0c104fd
commit
567d8689b8
3 changed files with 7 additions and 2 deletions
|
|
@ -10,4 +10,9 @@ class Contact < ActiveRecord::Base
|
||||||
|
|
||||||
validates :facebook, :twitter, :googleplus, :instagram,
|
validates :facebook, :twitter, :googleplus, :instagram,
|
||||||
format: URI::regexp(%w(http https)), allow_blank: true
|
format: URI::regexp(%w(http https)), allow_blank: true
|
||||||
|
|
||||||
|
def has_social_media?
|
||||||
|
return true if !facebook.blank? || !twitter.blank? || !googleplus.blank? || !instagram.blank?
|
||||||
|
false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
%p.lead.text-center
|
%p.lead.text-center
|
||||||
= @conference.short_title
|
= @conference.short_title
|
||||||
has the most awesome program ever!
|
has the most awesome program ever!
|
||||||
- if @conference.splashpage and @conference.splashpage.include_tracks
|
- if @conference.splashpage and @conference.tracks.any? and @conference.splashpage.include_tracks
|
||||||
See rock-star speakers cover the topics of
|
See rock-star speakers cover the topics of
|
||||||
- if @conference.splashpage and @conference.splashpage.include_tracks
|
- if @conference.splashpage and @conference.splashpage.include_tracks
|
||||||
- @conference.tracks.each_slice(3) do |slice|
|
- @conference.tracks.each_slice(3) do |slice|
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
%section#sponsors
|
%section#sponsors
|
||||||
= render 'sponsors'
|
= render 'sponsors'
|
||||||
|
|
||||||
- if @conference.splashpage.include_social_media
|
- if @conference.splashpage.include_social_media and @conference.contact.has_social_media?
|
||||||
%section#social-media
|
%section#social-media
|
||||||
= render 'social_media'
|
= render 'social_media'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue