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/controllers/staffs/people/relationships_controller.rb

21 lines
492 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Staffs::People::RelationshipsController < ApplicationController
before_action :set_person
# GET /staff/people/:person_id/relationships
def index
authorize [:staff, @person, :relationship]
@relationships = policy_scope(
@person.all_relationships.reorder(from_date: :desc),
policy_scope_class: Staff::Person::RelationshipPolicy::Scope,
)
end
private
def set_person
@person = Person.find params[:person_id]
end
end