You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
438 B
21 lines
438 B
2 years ago
|
class OrganisationRelationshipsController < ApplicationController
|
||
|
include Pagy::Backend
|
||
|
|
||
|
before_action :authenticate_user!
|
||
|
|
||
|
def managing_agents
|
||
|
# kick out if org isn't the current org
|
||
|
|
||
|
@managing_agents = OrganisationRelationships.where(
|
||
|
owning_organisation_id: organisation.id,
|
||
|
relationship_type: :managing,
|
||
|
)
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def organisation
|
||
|
@organisation ||= Organisation.find(params[:id])
|
||
|
end
|
||
|
end
|