default member scope to filter unconfirmed

This commit is contained in:
Torsten 2023-01-28 23:22:24 +02:00
parent eeb85d59f4
commit 5213cbce3b
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,8 @@
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,

View File

@ -39,9 +39,9 @@ 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: 'green-machine.local', port: 5000 }
routes.default_url_options = { host: 'localhost', port: 3000 }
routes.default_url_options = { host: 'green-machine.local', port: 5000 }
# Print deprecation notices to the Rails logger.