Skip to content

Add docs about path helpers #3078

Open
Open
@adrianthedev

Description

@adrianthedev

I've heard that request before.

Maybe we should create simpler path helpers that don't require the full instantiated resource? Maybe it can work with just a string (Avo::Resources::User) and we constantize it and extract the route key. The route key does not require an initialized resource.

One thing to take into consideration and show a warning about, is that if someone uses the record to generate a link, they might not work properly (Photo and PhotoComment scenario). So they might need to pass the full resource.

Maybe use get_resource_by_model_class from the resource manager?

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions