I have a specific signup process to handle, and I am turning around
the solution wo finding a clear validation ...
a visitor fill in a User Registration form ( email /pwd /pwd
I wrote a UserValidator class to check the uniqueness of the email
# if no user registered w this email, then no error , can proceed to
User.where(:email => self.email).empty? # no error
# if a user is already registered w this email,
target_subdomain = Subdomain.find(self.subdomain_id)
unless target_subdomain.members.where(;email => self;email).empty?
record.errors[:email] << "is already a member" # error
else # user is not a not a member of this subdomain....
existing_user = User.where(:email => self.email).first # get
existing user record
target_subdomain.members << existing_user
# THEN I WOULD LIKE TO BYPASS THE CREATION.... w no error
is there a way to do it ... ? it would simplify my sign up process ,
only one form, only one process...
thanks for your feedback ..