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

23 lines
471 B
Ruby
Raw Normal View History

2019-01-31 17:38:06 -05:00
# frozen_string_literal: true
2019-06-23 11:54:41 -04:00
class FederalSubjectsController < ApplicationController
2019-06-23 11:59:44 -04:00
before_action :set_federal_subject, except: :index
2019-01-31 17:38:06 -05:00
2019-06-23 11:59:44 -04:00
# GET /federal_subjects
2019-01-31 17:38:06 -05:00
def index
2019-06-23 11:59:44 -04:00
authorize :federal_subject
@federal_subjects = policy_scope(FederalSubject).order_by_display_name
2019-01-31 17:38:06 -05:00
end
2019-06-23 11:59:44 -04:00
# GET /federal_subjects/:id
2019-01-31 17:38:06 -05:00
def show
2019-06-23 11:59:44 -04:00
authorize @federal_subject
2019-01-31 17:38:06 -05:00
end
private
2019-06-23 11:59:44 -04:00
def set_federal_subject
@federal_subject = FederalSubject.find params[:id]
2019-01-31 17:38:06 -05:00
end
end