Skip to content

[Feature request] ForestAdmin UI collection URL helper method #677

@lostie

Description

@lostie

Expected behaviour

In some of our collection views or smart actions we would like to present a URL link to a specific ForestAdmin page, that might not necessarily be an association of the current collection the user is viewing.

I've had a look at similar questions posted in the community website (just an example) but all seem to suggest to try and form the URL ourselves manually. I've found several issues with that:

  • We couldn't find all the components required to form the URL (just as an example, the MyEnvironment component)
  • It seems that the structure of the URL has evolved through time and therefore anything that we design right now is suitable to break in the future

It would be very helpful instead if the gem provided some interface that given an instance of a model, it returns the URL for the collection details page taking into account all the variables the URL requires (project, environment, team, etc...):

manufacturer = Manufacturer.last
forest_collection_url(model)

And since the gem should have all this information, it would always generate an up to date URL.

Context

  • Package Version: 9.3.5
  • Rails Version: 7.1.3.3
  • Database Dialect: Postgresql
  • Database Version: 16.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions