default scope throws devise
This commit is contained in:
parent
a86806e357
commit
2305577e9d
@ -3,7 +3,7 @@ class MembersController < ApplicationController
|
||||
|
||||
# GET /members
|
||||
def index
|
||||
@members = Member.order(:name).page params[:page]
|
||||
@members = Member.public.order(:name).page params[:page]
|
||||
end
|
||||
|
||||
# GET /members/1
|
||||
|
@ -1,6 +1,6 @@
|
||||
class Member < ApplicationRecord
|
||||
|
||||
def self.default_scope
|
||||
def self.public
|
||||
where.not(confirmed_at: nil).where.not(picture: nil)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user