Rails_admin - how to sort by user fields as a list

I am using RoR 4.1 with RailsAdmin 0.6.8. I can create custom fields in RA either by defining a method on a model, including using

field :custom_method 

or formatted_value

field :custom_field do
 formatted_value{ bindings[:object].something_here }
end

The problem is that I cannot sort by this column as a list. Does anyone have any experience?

+4
source share
1 answer
field :custom_field do
sortable :name #or:lastname or :firstname
formatted_value{ bindings[:object].something_here}
end
0
source

Source: https://habr.com/ru/post/1611499/


All Articles