1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/helpers/regional_offices_helper.rb

16 lines
464 B
Ruby

# frozen_string_literal: true
module RegionalOfficesHelper
def regional_office_link_or_none(regional_office)
if regional_office.nil?
none
elsif policy(regional_office.federal_subject).show?
link_to regional_office.federal_subject.display_name,
regional_office.federal_subject
else
regional_office.federal_subject.display_name
end
end
alias staff_regional_office_link_or_none regional_office_link_or_none
end