Skip to content

Commit

Permalink
eager load notification events
Browse files Browse the repository at this point in the history
  • Loading branch information
madhums committed Mar 7, 2024
1 parent 4dec152 commit e8da9b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/notifications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class NotificationsController < ApplicationController

after_action :mark_notifications_as_read, only: :index
def index
@notifications = current_user.notifications.newest_first
@notifications = current_user.notifications.includes(:event).newest_first
end

private
Expand Down

0 comments on commit e8da9b7

Please sign in to comment.