You’re not receiving notifications from this thread.
How to display and order model result with Ahoy::Event?
I’m stuck with Gem Ahoy.
In my rails app, i have a Room model, each Room has many subject.
After installing Ahoy, i succeed to display the Ahoy::Event result (=number of views) for each subject, but i’m stuck to display the last 5 most viewed subject in my Room dashboard (subject with most Ahoy::Event id).
I'm able to display for one specific subject
<%= Ahoy::Event.where_props(subject_id: 121).count %>
but stuck for order all subject of a Room by Ahoy::Event result (most viewed)
I tried many stuff but nothing working.
Any Idea ?
Thanks so much !