disable confirmation in dev
This commit is contained in:
parent
0727adc4fb
commit
f5d3956a7c
@ -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 }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user