Skip to content

Commit

Permalink
fixup! Show Claim Activities as a timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitemaeric committed Dec 24, 2024
1 parent eada890 commit 58254a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def show
@claim_activity = Claims::ClaimActivity.find(params[:id])

if @claim_activity.sampling_uploaded?
@pagy, @provider_samplings = pagy(@claim_activity.record.provider_samplings.joins(:provider).order(providers: { name: :asc }))
@pagy, @provider_samplings = pagy(@claim_activity.record.provider_samplings.order_by_provider_name)
end

authorize [:claims, @claim_activity]
Expand Down
2 changes: 2 additions & 0 deletions app/models/claims/provider_sampling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ class Claims::ProviderSampling < ApplicationRecord
has_many :claims, through: :provider_sampling_claims

has_one_attached :csv_file

scope :order_by_provider_name, -> { joins(:provider).order(providers: { name: :asc }) }
end

0 comments on commit 58254a9

Please sign in to comment.