disable confirmation in dev

This commit is contained in:
Torsten 2023-10-23 11:18:38 +03:00
parent 959a04b328
commit c8eeb28826

View File

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