Skip to content

Commit

Permalink
AP-5701: Update HasOtherProceedingsForm with remaining_proceedings me…
Browse files Browse the repository at this point in the history
…thod

This will be used on the view to define logic on
when to show and hide text values
  • Loading branch information
colinbruce committed Jan 31, 2025
1 parent 16de68f commit acd954e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ class HasOtherProceedingsForm < BaseForm

delegate :proceedings, to: :model

def remaining_proceedings
@remaining_proceedings ||= LegalFramework::ProceedingTypes::All.call(model).count
rescue LegalFramework::ProceedingTypes::All::NoMatchingProceedingsFoundError
0
end

def draft!
@draft = true
end
Expand Down

0 comments on commit acd954e

Please sign in to comment.