Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sorted provider events #1047

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikesndrs
Copy link
Contributor

@mikesndrs mikesndrs commented Nov 11, 2024

Summary of changes
Sort events on provider show page by start date

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree
    to license it to the TeSS codebase under the
    BSD license.

@@ -64,7 +64,7 @@
locals: { total_count: upcoming_events.count,
past_count: past_events.count,
limit: resource_limit,
resources: events,
resources: events.sort_by(&:start),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to order upcoming_events with .order(start: :asc), otherwise you are just sorting the set of 30 events that were returned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants