diff --git a/app/controllers/conferences_controller.rb b/app/controllers/conferences_controller.rb index 41e43bfa..a9dcdd3b 100644 --- a/app/controllers/conferences_controller.rb +++ b/app/controllers/conferences_controller.rb @@ -91,12 +91,14 @@ class ConferencesController < ApplicationController e.uid = conf.guid e.url = conference_url(conf.short_title) v = conf.venue - e.geo = v.latitude, v.longitude if v.latitude && v.longitude - location = '' - location += "#{v.street}, " if v.street - location += "#{v.postalcode} #{v.city}, " if v.postalcode && v.city - location += v.country_name if v.country_name - e.location = location if location + if v + e.geo = v.latitude, v.longitude if v.latitude && v.longitude + location = '' + location += "#{v.street}, " if v.street + location += "#{v.postalcode} #{v.city}, " if v.postalcode && v.city + location += v.country_name if v.country_name + e.location = location if location + end end end end diff --git a/app/helpers/conference_helper.rb b/app/helpers/conference_helper.rb index 6ec2449c..f685ed89 100644 --- a/app/helpers/conference_helper.rb +++ b/app/helpers/conference_helper.rb @@ -36,13 +36,15 @@ module ConferenceHelper e.uid = proposal.guid e.url = conference_program_proposal_url(conference.short_title, proposal.id) v = conference.venue - e.geo = v.latitude, v.longitude if v.latitude && v.longitude - location = '' - location += "#{proposal.room.name} - " if proposal.room.name - location += " - #{v.street}, " if v.street - location += "#{v.postalcode} #{v.city}, " if v.postalcode && v.city - location += "#{v.country_name}, " if v.country_name - e.location = location + if v + e.geo = v.latitude, v.longitude if v.latitude && v.longitude + location = '' + location += "#{proposal.room.name} - " if proposal.room.name + location += " - #{v.street}, " if v.street + location += "#{v.postalcode} #{v.city}, " if v.postalcode && v.city + location += "#{v.country_name}, " if v.country_name + e.location = location + end e.categories = conference.title, "Difficulty: #{proposal.difficulty_level.title}", "Track: #{proposal.track.name}" end end