disable confirmation in dev

This commit is contained in:
Torsten 2023-10-23 11:18:53 +03:00
parent 0727adc4fb
commit f5d3956a7c
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)
@ -18,6 +19,10 @@ class Member < ApplicationRecord
has_many :stories
has_many :pictures
def skip_conf!
self.confirm! if Rails.env.development?
end
validates :bio, length: { maximum: 1000 }
validates :name , length: { minimum: 3 }