Sprankelprachtig aan/afmeldsysteem

people_controller.rb 459B

12345678910111213141516171819202122
  1. class Api::PeopleController < ApiController
  2. before_action :set_person, only: [:show]
  3. before_action :api_require_admin! # Normal people should use /me
  4. # GET /api/people
  5. # GET /api/people.json
  6. def index
  7. @people = Person.all
  8. end
  9. # GET /api/people/1
  10. # GET /api/people/1.json
  11. def show; end
  12. private
  13. # Use callbacks to share common setup or constraints between actions.
  14. def set_person
  15. @person = Person.find(params[:id])
  16. end
  17. end