Medium badge JSON API Rails

Challenge

Only editable by group admins

  • Last updated November 17, 2018 at 10:51 AM by hankish
  • Evidence only visible to badge awarders
Solve this learning challenge by posting code snippets.
First, go back to the challenge you did for the JSON API badge (https://www.badgelist.com/team/json-api-v1/Challenge) and grab the JSON that you made there. Go ahead and post that JSON as an entry to this requirement too.

Then code out a JSON API Rails implementation which would dynamically generate the resource roughly as you mocked it up. You'll need two files:
  • SerializableVoter >> Generates the voter data within the endpoint.
  • VotersController >> Defines the index operation itself and calls the render method.