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

28 lines
658 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Staffs::RelationStatusesController < ApplicationController
2020-01-04 13:51:32 -05:00
include PaginalController
before_action :set_relation_status, only: :show
# GET /staff/relation_statuses
def index
authorize [:staff, RelationStatus]
@relation_statuses = policy_scope(
RelationStatus.order(codename: :asc),
policy_scope_class: Staff::RelationStatusPolicy::Scope,
2020-01-04 13:51:32 -05:00
).page(active_page)
end
# GET /staff/relation_statuses/:codename
def show
authorize [:staff, @relation_status]
end
private
def set_relation_status
@relation_status = RelationStatus.find_by! codename: params[:codename]
end
end