Skip to content

Commit

Permalink
order upcoming events instead of resources
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesndrs committed Nov 25, 2024
1 parent ed68847 commit 11f0b53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/content_providers/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<% resource_limit = 30 %>
<% materials = @content_provider.materials.from_verified_users.limit(resource_limit) %>
<% materials_count = @content_provider.materials.from_verified_users.count %>
<% upcoming_events = @content_provider.events.from_verified_users.not_finished.not_disabled %>
<% upcoming_events = @content_provider.events.from_verified_users.not_finished.not_disabled.order(start: :asc) %>
<% past_events = @content_provider.events.from_verified_users.finished.not_disabled %>
<% events = upcoming_events.limit(resource_limit) %>
<% e = @content_provider.events.from_verified_users.not_disabled %>
Expand Down Expand Up @@ -64,7 +64,7 @@
locals: { total_count: upcoming_events.count,
past_count: past_events.count,
limit: resource_limit,
resources: events.sort_by(&:start),
resources: events,
activator: activator,
view_all_link: events_path(content_provider: @content_provider.title),
inc_expired_link: events_path(content_provider: @content_provider.title, include_expired: true) } %>
Expand Down

0 comments on commit 11f0b53

Please sign in to comment.