default member scope to filter unconfirmed
This commit is contained in:
@ -1,4 +1,9 @@
|
||||
class Member < ApplicationRecord
|
||||
|
||||
def self.default_scope
|
||||
where.not(confirmed_at: nil).where.not(picture: nil)
|
||||
end
|
||||
|
||||
# Include default devise modules. Others available are:
|
||||
# , :lockable, :timeoutable, :trackable and :omniauthable
|
||||
devise :database_authenticatable, :registerable,:confirmable,
|
||||
@ -8,7 +13,7 @@ class Member < ApplicationRecord
|
||||
has_many :stories
|
||||
has_many :stories
|
||||
has_many :pictures
|
||||
|
||||
|
||||
validates :bio, length: { maximum: 1000 }
|
||||
validates :name , length: { minimum: 3 }
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
%ul.space-y-4.text-sm
|
||||
%li
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/volunteering"}
|
||||
About Volunteeing
|
||||
About Volunteering
|
||||
%li
|
||||
%a.text-gray-700.transition.hover:opacity-75{:href => "/arriving"}
|
||||
Getting here
|
||||
|
Reference in New Issue
Block a user