notmarkmiranda / careless-whisper

0 stars 0 forks source link

Pool creation flow #18

Open notmarkmiranda opened 2 weeks ago

notmarkmiranda commented 2 weeks ago

Acceptance Criteria

  1. This must be done by a logged in user
  2. UU will be redirected to /sign-in path
  3. A user can navigate to /pools/new by clicking on the Create Pool link on the dashboard.
  4. The user will be required to enter
    • a pool name
      • store a unique-pool-name that hashes the pool_name + user_id, so theoretically the uniqueness would be pool name scoped to user_id
        • what is the advantage to doing it this way and not just putting a scope on both things on the model?
          • is it faster for a lookup if we index that column?
          • this would have to be using a before_save hook in order to rollback if it is not a unique value
    • event_date
      • this will be used to trigger a job check whether entries can still be entered.
    • multiple_entries
      • boolean, default: false
      • check box or switch?
  5. The other attributes on a pool will be:
    • ready_for_entries
      • boolean, default: false
    • user_id
      • foreign_key
      • this would define the superadmin
  6. On success: the user will be redirected to the pool#show page
  7. On failure: the user will be redirected back tot he pools#new page