Summary

We need to allow agency members to upload and show their resume. Resumes should be versioned, such that you can select a different version of your resume that you'd like to show.

https://github.com/agency-of-learning/PairApp/issues/179

Proposals

Proposal 1: Create Resume model (I’m leaning most heavily towards this proposal)

Create a new Resume model. A User has_many :resumes .

Resume model would has_one_attached :resume , a name, a current flag, and a user_id.

Attached resume would be validated to ensure the attachment is a .pdf file type.

Pros:

  1. Simple to reason about
  2. Simple to update
  3. Easy to create forms, controllers, and routes for CRUD actions to manage these resources

Cons:

  1. A whole new model?

Proposal 2: Add [has_many_attache](<https://edgeapi.rubyonrails.org/classes/ActiveStorage/Attached/Model.html#method-i-has_many_attached>)d :resumes to Users

User model would has_many_attached :resumes.

“Current” version of the resume would be tracked by caching a reference to the attachment, like the blob_id, on the user.

Attached resume would be validated to ensure the attachment is a .pdf file type.

Pros: