Provide current-contributor application-wide

* This change allows us to reuse the current user in multiple places.
This commit is contained in:
kiragrammel
2023-09-11 13:54:30 +02:00
committed by Sebastian Serth
parent c29256aa81
commit 883169121c
4 changed files with 13 additions and 2 deletions

View File

@ -55,6 +55,15 @@ class ProgrammingGroup < ApplicationRecord
"Programming Group #{id}"
end
def to_page_context
{
id:,
type: self.class.name,
consumer: '',
displayname:,
}
end
def programming_partner_ids
users.map(&:id_with_type)
end