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 901ddbb commit 0bd1bb8
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 @@ -27,5 +27,7 @@ class Claims::ProviderSampling < ApplicationRecord

has_one_attached :csv_file

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

delegate :email_address, :name, to: :provider, prefix: true
end

0 comments on commit 0bd1bb8

Please sign in to comment.