code-corps-api icon indicating copy to clipboard operation
code-corps-api copied to clipboard

RFC: Merge project `approved` and `approval_requested` flags into a single field

Open begedin opened this issue 8 years ago • 0 comments

Problem

Looking at these two fields, it really seems they serve a singular purpose.

# A project is created 
`approved: false, approval_requested: false`
# User submits project for approval 
`approved: false, approval_requested: true`
# Admin approves project 
`approved: true, approval_requested :does_not_matter`

A single field, for example,

# 'created' -> 'pending_approval' -> 'approved'
field :onboarding_status, :string, null: false, default: 'created' 

Might serve our purposes much better.

We could add an additional status of rejected later, with an additional field of rejected_reason or something.

begedin avatar Dec 06 '17 12:12 begedin