mercredi 17 août 2016

Ranking in ActiveAdmin

I have difficulty in one particular task in ActiveAdmin (I am a beginner in Rails). I have a Route model in which there is a start location, an arrival location, a distance, a duration etc... I want to configure ActiveAdmin so that i have a page that show the top 10 route depending on the start location and the arrival location (i.e : ‘London-> ‘Manchester' number 1 with 32 routes, ‘Swansea’ -> ‘Cardiff’ number 2 with 27 routes). I have looked for a way to do it but Nothing looked to fit my problem. I found Ransack for sorting and searching but I don’t think it is what I need. If you have any advices, tutorials or resources to help, it would help me a lot !

Sorry for my bad English and thanks in advance !

Aucun commentaire:

Enregistrer un commentaire