disable confirmation in dev

This commit is contained in:
Torsten 2023-10-23 11:18:38 +03:00
parent 959a04b328
commit c8eeb28826
1 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
class Member < ApplicationRecord
after_create :skip_conf!
def self.public_scope
where.not(confirmed_at: nil).where.not(picture: nil)
@ -13,6 +14,10 @@ class Member < ApplicationRecord
devise :database_authenticatable, :registerable,:confirmable,
:recoverable, :rememberable, :validatable, :async
def skip_conf!
self.confirm! if Rails.env.development?
end
mount_uploader :picture, PictureUploader
has_many :stories
has_many :stories