Surface object-level validation errors in the admin
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 5.3k
- Forks
- 1.4k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 62
Description
Desired Behavior
Present errors on the :base of an object to admin users. Errors should be presented whenever objects are being created or updated and they fail due to object-level validation errors.
(Optional) Current Behavior
Currently, no error is presented to the user. A 422 turbo request occurs in the background, but it does not surface what went wrong.
(Optional) Additional notes
- We could categorize this as a bug, but I think the kind of work that needs to be done is more feature-like.
- Ideally, every
@resourcerecord with object-level validation errors on it can be treated the same way. But we should implement it in such a way that developers can redefine functionality per resource. (Just look at how the existingResourcesControllerand resource base components work.) - I think that we should use the existing
flash[:alert]functionality thatsolidus_adminprovides to surface these errors.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing ResourcesController and resource base components to trace how create and update failures are handled, including the existing flash[:alert] functionality. Verify the 422 Turbo request path for object-level :base validation errors. Done means admin users see those errors for every resource while resource-specific redefinition remains possible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100