avo
avo copied to clipboard
Improve STI / Polymorphic creation flow with type selection
Context
- [ ] Make this a guide
https://www.loom.com/share/31c8999bce3640ed9c69558472a74d06
- [ ] Build a new view component for type selection
- [ ] Add meta to the resource where the developer can configures the entities like
- [ ] Use meta[:entities] on the new view component to
- [ ] Add some links on the view component, each link redirecting to a STI / polymorphic type creation
def entities
return @resource.meta[:entities] if @resource.meta[:entities].present?
@resource.record.class.descendants
end
self.meta = {
entities: [Spouse, Sibling]
}
This issue has been marked as stale because there was no activity for the past 15 days.