Skip to content

Commit

Permalink
order registration_history_entries by timestamp (thewca#10359)
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnIckler authored Dec 3, 2024
1 parent 29dd0b9 commit 259c84f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/registration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Registration < ApplicationRecord
belongs_to :user, optional: true # A user may be deleted later. We only enforce validation directly on creation further down below.
belongs_to :accepted_user, foreign_key: "accepted_by", class_name: "User", optional: true
belongs_to :deleted_user, foreign_key: "deleted_by", class_name: "User", optional: true
has_many :registration_history_entries, dependent: :destroy
has_many :registration_history_entries, -> { order(:created_at) }, dependent: :destroy
has_many :registration_competition_events
has_many :registration_payments
has_many :competition_events, through: :registration_competition_events
Expand Down

0 comments on commit 259c84f

Please sign in to comment.