counting private profiles

This commit is contained in:
Torsten 2023-11-28 10:54:06 +02:00
parent 35e73d1fc2
commit 0c645f61e9
2 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,8 @@ class MembersController < ApplicationController
where("leaving > ?" , Date.today).
order(:leaving).
page params[:page]
@private = Member.where("arriving < ? " , Date.today).
where("leaving > ?" , Date.today).count - @members.length
end
def timeline

View File

@ -3,6 +3,11 @@
.flex.justify-center.m-8.mx-5.md:mx-12.lg:mx-20
.flex.flex-col.text-center
%h1.text-4xl Current Volunteers at Hub Feenix
-if @private > 0
.text-gray-500
Not showing
= @private
private profiles
.mx-20.grid.grid-cols-1.md:grid-cols-2.lg:grid-cols-3.2xl:grid-cols-4.gap-8.md:gap-12.lg:gap-16
- @members.each do |member|