fix member scope
This commit is contained in:
parent
e7631e51db
commit
450c50bd90
@ -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
|
||||
|
@ -1,4 +1,5 @@
|
||||
class Member < ApplicationRecord
|
||||
|
||||
def self.public_scope
|
||||
where.not(confirmed_at: nil).where.not(picture: nil)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user