app/helpers/application_helper.rb
##
# Returns a string build from the start and end date of the given conference.
#
# If the conference is only one day long
# * %B %d %Y (January 17 2014)
# If the conference starts and ends in the same month and year
# * %B %d - %d, %Y (January 17 - 21 2014)
# If the conference ends in another month but in the same year
# * %B %d - %B %d, %Y (January 31 - February 02 2014)
# All other cases
# * %B %d, %Y - %B %d, %Y (December 30, 2013 - January 02, 2014)
Returns a string build from the start and end date of the given conference.
Returns a string build from the start and end date of the given conference .
def tracks(conference)
    all = conference.program.tracks.map {|t| t.name}
    first = all[0...-1]
    last = all[-1]
    ts = ''
    if all.length > 1
      ts << first.join(', ')
      ts << " and #{last}"
    else
      ts = all.join
    end
    return ts
  end
def tracks ( conference ) all = conference . program . tracks . map { | t | t . name } first = all [ 0 ... - 1 ] last = all [ - 1 ] ts = '' if all . length > 1 ts << first . join ( ', ' ) ts << " and #{last}" else ts = all . join end return ts end
Returns a string build from the start and end date of the given conference.
Returns a string build from the start and end date of the given conference .
conference
<not_specific>