diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index dfc9f3fe..846cdf37 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -189,8 +189,8 @@ module ApplicationHelper end # TODO:Snap!Con: Replace this with a search for a conference logo. - def nav_root_link_for(conference) - path = conference.try(:name) ? conference_path(conference) : root_path + def nav_root_link_for(conference = nil) + path = !conference.nil? ? conference_path(conference) : root_path link_to( image_tag('snapcon_logo.png'), path, diff --git a/app/helpers/conference_helper.rb b/app/helpers/conference_helper.rb index bd04898c..39316f9f 100644 --- a/app/helpers/conference_helper.rb +++ b/app/helpers/conference_helper.rb @@ -24,6 +24,6 @@ module ConferenceHelper def short_ticket_description(ticket) return unless ticket.description - markdown(ticket.description&.split("\n").first&.strip) + markdown(ticket.description.split("\n").first&.strip) end end diff --git a/app/models/conference.rb b/app/models/conference.rb index c91939ae..f0880d3b 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -700,7 +700,7 @@ class Conference < ApplicationRecord # Returns the current day if it is a day of the schedule or nil otherwise def current_conference_day - day = Time.find_zone(timezone).today + day = Time.now.in_time_zone(timezone).today day if (start_date..end_date).cover? day end