Skip to content

Commit

Permalink
Sort notifications in descending order gain
Browse files Browse the repository at this point in the history
  • Loading branch information
saraycp committed May 20, 2024
1 parent 1cb2eaa commit 2808fff
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def show_more(notifications)
end

def fetch_notifications
notifications = policy_scope(Notification).for_web.includes(notifiable: [{ commentable: [{ comments: :user }, :project, :bs_request_actions] }, :bs_request_actions, :reviews])
notifications = policy_scope(Notification).for_web.includes(notifiable: [{ commentable: [{ comments: :user }, :project, :bs_request_actions] }, :bs_request_actions, :reviews]).order(created_at: :desc)

if params[:project]
notifications.unread.for_project_name(params[:project])
Expand Down

0 comments on commit 2808fff

Please sign in to comment.