diff --git a/Gemfile.lock b/Gemfile.lock index a054b2a8..3b3b1f4c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -625,6 +625,7 @@ PLATFORMS arm64-darwin-21 arm64-darwin-22 arm64-darwin-23 + arm64-darwin-24 x86_64-linux DEPENDENCIES diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2c2fbf3c..6df0c7c9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,7 +12,9 @@ class ApplicationController < ActionController::Base def current_profile = current_user&.profile # TODO: Must change after implementing multi-conference support - def current_conference = Conference.last + def current_conference + @_current_conference ||= Conference.last + end def vapid_public_key Base64.urlsafe_decode64(ENV["VAPID_PUBLIC_KEY"]).bytes.to_json diff --git a/app/controllers/schedules_controller.rb b/app/controllers/schedules_controller.rb index 67aa3c74..f3d070f9 100644 --- a/app/controllers/schedules_controller.rb +++ b/app/controllers/schedules_controller.rb @@ -3,7 +3,7 @@ def show @sessions = SessionQuery.new( relation: current_user.sessions.where(conference: current_conference), params: filter_params - ).call.includes(:attendees, :location, :speakers, :tags).order(:starts_at) + ).call.includes(:location, :tags, speakers: [profile: :image_attachment]).order(:starts_at) end private diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 40ce9583..c4d810cb 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -4,11 +4,11 @@ def index @sessions = SessionQuery.new( relation: sessions.joins(:location).distinct, params: filter_params - ).call.includes(:attendees, :tags).order(:starts_at) + ).call.includes(:location, :tags, speakers: [profile: :image_attachment]).order(:starts_at) end def show - @session = sessions.friendly.find(params[:id]) + @session = sessions.friendly.includes(:location, :tags, speakers: [profile: :image_attachment]).find(params[:id]) end private diff --git a/app/views/layouts/_bottom_navbar.html.erb b/app/views/layouts/_bottom_navbar.html.erb index 1f7b5b69..a40c4d5a 100644 --- a/app/views/layouts/_bottom_navbar.html.erb +++ b/app/views/layouts/_bottom_navbar.html.erb @@ -54,7 +54,7 @@ <% if unread_notifications.present? %>
<%= speaker.job_title %>
@@ -94,7 +94,7 @@- <%= "About the #{'speaker'.pluralize(@session.speakers.count)}" %> + <%= "About the #{'speaker'.pluralize(@session.speakers.length)}" %>