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/people_helper.rb

18 lines
380 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module PeopleHelper
2019-08-14 08:18:18 -04:00
def staff_person_link_or_none(person)
if person.nil?
2019-08-28 14:21:35 -04:00
none
2019-08-14 08:18:18 -04:00
elsif policy([:staff, person]).show?
link_to person.full_name, [:staff, person]
else
person.full_name
end
end
2019-09-01 10:42:16 -04:00
def person_account_connection_link(person)
new_settings_person_url token: person.account_connection_token
2019-09-01 10:42:16 -04:00
end
end