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

Sort column by extracted value #113

Open
archonic opened this issue Feb 19, 2013 · 0 comments
Open

Sort column by extracted value #113

archonic opened this issue Feb 19, 2013 · 0 comments

Comments

@archonic
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant