jeudi 20 avril 2023

How to add sorting to a column with dynamic data in active admin

I have a column Average that gets the value :total from db and we are doing total/3 in average column. as follows

index do
    selectable_column
    id_column
     column 'Average', sortable: true do |object|
      object.total/3
    end
end

I want to add sorting to this column. Can someone please help me with this one?..

Aucun commentaire:

Enregistrer un commentaire