25 lines
455 B
Ruby
25 lines
455 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Staffs::PeopleController < ApplicationController
|
|
before_action :set_person, except: :index
|
|
|
|
# GET /staff/people
|
|
def index
|
|
authorize %i[staff person]
|
|
@people = policy_scope(
|
|
Person,
|
|
policy_scope_class: Staff::PersonPolicy::Scope,
|
|
)
|
|
end
|
|
|
|
# GET /staff/people/:id
|
|
def show
|
|
authorize [:staff, @person]
|
|
end
|
|
|
|
private
|
|
|
|
def set_person
|
|
@person = Person.find params[:id]
|
|
end
|
|
end
|