fix member scope

This commit is contained in:
Torsten 2023-05-24 17:52:52 +03:00
parent e7631e51db
commit 450c50bd90
2 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,7 @@ class MembersController < ApplicationController
# GET /members
def index
@members = Member.order(:name).page params[:page]
@members = Member.public_scope.order(:name).page params[:page]
end
# GET /members/1

View File

@ -1,4 +1,5 @@
class Member < ApplicationRecord
def self.public_scope
where.not(confirmed_at: nil).where.not(picture: nil)
end