Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Sort column by extracted value #113

@archonic

Description

@archonic

I have a model "document" which users have different roles on. This role is extracted and shown in the search results table like so:

<% user_role = '---'
   user_role = 'Member' if (standard.user_ids.include? @current_user.id)
   user_role = 'Leader' if (standard.lead == @current_user)
   %>

<%= user_role %>

Is it possible to sort by the outcome of this logic instead of by something in the document model?

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