default member scope to filter unconfirmed
This commit is contained in:
parent
4278b55e22
commit
3df2618315
@ -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
|
||||
|
@ -39,7 +39,7 @@ Rails.application.configure do
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
config.action_mailer.perform_caching = false
|
||||
config.action_mailer.default_url_options = { host: 'localhost', port: 4000 }
|
||||
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
|
||||
|
||||
routes.default_url_options = { host: 'localhost', port: 3000 }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user