Skip to content

Commit

Permalink
Order my-proposals by event desc
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Mar 5, 2025
1 parent d6758b9 commit 2666e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/proposals_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ProposalsController < ApplicationController
decorates_assigned :proposal

def index
proposals = current_user.proposals.decorate.group_by {|p| p.event}
proposals = current_user.proposals.order(event_id: :desc).decorate.group_by {|p| p.event}
invitations = current_user.pending_invitations.decorate.group_by {|inv| inv.proposal.event}
events = (proposals.keys | invitations.keys).uniq

Expand Down

0 comments on commit 2666e60

Please sign in to comment.