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

17 lines
464 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module RegionalOfficesHelper
def regional_office_link_or_none(regional_office)
if regional_office.nil?
2019-08-28 14:21:35 -04:00
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