Skip to content

Commit

Permalink
order works randomly on first load
Browse files Browse the repository at this point in the history
  • Loading branch information
progapandist committed Jun 13, 2024
1 parent a337460 commit 70e2232
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/works_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class WorksController < ApplicationController

def index
# We always pick one work
@pagy, works = pagy(Work.all, items: 1)
@pagy, works = pagy(Work.all.random, items: 1)
@work = works.sole
@max_page = @pagy.pages
end
Expand Down

0 comments on commit 70e2232

Please sign in to comment.