Open archonic opened 11 years ago
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?
I have a model "document" which users have different roles on. This role is extracted and shown in the search results table like so:
Is it possible to sort by the outcome of this logic instead of by something in the document model?