diff --git a/app/controllers/points_controller.rb b/app/controllers/points_controller.rb index 7043a48a..20aa37bc 100644 --- a/app/controllers/points_controller.rb +++ b/app/controllers/points_controller.rb @@ -17,6 +17,8 @@ class PointsController < ApplicationController @start_at = Time.zone.at(start_at) @end_at = Time.zone.at(end_at) + + @points_number = @points.except(:limit, :offset).size end def bulk_destroy diff --git a/app/views/points/index.html.erb b/app/views/points/index.html.erb index 2f57e6bd..f83be405 100644 --- a/app/views/points/index.html.erb +++ b/app/views/points/index.html.erb @@ -43,6 +43,9 @@
<%= f.submit "Delete Selected", class: "px-4 py-2 bg-red-500 text-white rounded-md", data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" } %> +
+ <%= @points_number %> points found +
Order by: <%= link_to 'Newest', points_path(order_by: :desc), class: 'btn btn-xs btn-primary mx-1' %>