Skip to content

Collection link for STI model #2813

@gh-axel-czarniak

Description

@gh-axel-czarniak
  • What were you trying to do?
    Hello, I have a dashboard that have multiple items in a collection. In the dashboard, I have this relation:

messages: Field::HasMany.with_options(sort_by: :created_at, direction: :desc)

My message class is an STI and only use child as real type. For example:

class Request < Message

Currently, in this display, each line isn't clickable because the class is Request instead of Message.

How can I make the STI subclass use the main class for all things related to Administrate (route, dashboard, etc).

  • What versions are you running?
    • Rails: 7.2.2.1
    • administrate: 0.20.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    fieldsnew fields, displaying and editing datamodelsmodels, associations and fetching the underlying data

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions