Git Product home page Git Product logo

Comments (3)

dancristianb avatar dancristianb commented on June 11, 2024

Just checked and I think this might be related to https://github.com/rubygems/rubygems.org/pull/4520/files#diff-7a47d335107fc35c2e79cc9c2b0a195c863594dd2343bcd48a4c770ac4af673cR11

Having some data in and checking the latest version of the profile page, I see the gems not ordered by download count.

Screenshot 2024-03-18 at 23 34 08

If I set the Prosopite.raise flag false and use the old User.find_by_slug!(params[:id]) query in the ProfilesController#show action, I see the rubygems_downloaded scope order correctly applied and the gems order by download count.

Screenshot 2024-03-18 at 23 35 01

We could update the show action to use something like the attached, so we both avoid the n+1 and have the entries order.

@user = User.includes(rubygems_downloaded: %i[most_recent_version gem_download])
  .order("gem_downloads_rubygems.count DESC").strict_loading
  .find_by_slug!(params[:id])

Seems to work, I'm not sure if it's the best approach though 😀

Screenshot 2024-03-18 at 23 50 11

from rubygems.org.

dancristianb avatar dancristianb commented on June 11, 2024

I have this small #4544 PR covering the profile page gem order updates ready for review. Let me know what you think, thanks! 😀

from rubygems.org.

simi avatar simi commented on June 11, 2024

Thanks for the report @rubyFeedback, indeed this was changed by mistake and will be hopefully fixed by #4544 soon. 🙏

from rubygems.org.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.