Example Design of a Feature
Learn about the design feature of editing the widget in our Rails application.
Requirements for editing a widget
Suppose we are building a feature to edit widgets. Here is a rough outline of the requirements around how it should work:
- A user views a form where they can edit a widget’s metadata.
- The user submits the form with a validation error.
- The form is rerendered, showing their errors.
- The user corrects the error and submits the edit again.
- The system then updates the database.
- When the widget is updated, two things have to happen:
- Depending on the widget’s manufacturer, we need to notify an admin to approve the changes.
- If the widget is of a particular type, we must update an inventory table used for reporting.
- The user sees a result
Get hands-on with 1400+ tech skills courses.