Tweak timezone check and minor style tweaks
This commit is contained in:
parent
2b598fb2d6
commit
7181b05a83
3 changed files with 4 additions and 4 deletions
|
|
@ -189,8 +189,8 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO:Snap!Con: Replace this with a search for a conference logo.
|
# TODO:Snap!Con: Replace this with a search for a conference logo.
|
||||||
def nav_root_link_for(conference)
|
def nav_root_link_for(conference = nil)
|
||||||
path = conference.try(:name) ? conference_path(conference) : root_path
|
path = !conference.nil? ? conference_path(conference) : root_path
|
||||||
link_to(
|
link_to(
|
||||||
image_tag('snapcon_logo.png'),
|
image_tag('snapcon_logo.png'),
|
||||||
path,
|
path,
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,6 @@ module ConferenceHelper
|
||||||
|
|
||||||
def short_ticket_description(ticket)
|
def short_ticket_description(ticket)
|
||||||
return unless ticket.description
|
return unless ticket.description
|
||||||
markdown(ticket.description&.split("\n").first&.strip)
|
markdown(ticket.description.split("\n").first&.strip)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -700,7 +700,7 @@ class Conference < ApplicationRecord
|
||||||
|
|
||||||
# Returns the current day if it is a day of the schedule or nil otherwise
|
# Returns the current day if it is a day of the schedule or nil otherwise
|
||||||
def current_conference_day
|
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
|
day if (start_date..end_date).cover? day
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue