molten-trunk/molten5_withgrid/app/models/lead.rb
def validates_email_uniqueness
    if validate_attributes == true
      if email and (Contact.find_by_email(email) or Lead.find(:first, :conditions => ["email = ? and record_type_id = ?",email,MOLTEN_REQUEST_RECORD_TYPE]))
        errors.add('email', "A contact already exists with this email address.")
      end
    end
  end
# Can't have a contact account and must not have an exisiting
# lead with the MOLTEN_REQUEST_RECORD_TYPE record type.
Can't have a contact account and must not have an exisiting
lead with the MOLTEN_REQUEST_RECORD_TYPE record type.
Can ' t have a contact account and must not have an exisiting lead with the MOLTEN_REQUEST_RECORD_TYPE record type .
def validates_email_uniqueness
    if validate_attributes == true
      if email and (Contact.find_by_email(email) or Lead.find(:first, :conditions => ["email = ? and record_type_id = ?",email,MOLTEN_REQUEST_RECORD_TYPE]))
        errors.add('email', "A contact already exists with this email address.")
      end
    end
  end
def validates_email_uniqueness if validate_attributes == true if email and ( Contact . find_by_email ( email ) or Lead . find ( :first , :conditions => [ "email = ? and record_type_id = ?" , email , MOLTEN_REQUEST_RECORD_TYPE ] ) ) errors . add ( 'email' , "A contact already exists with this email address." ) end end end
Can't have a contact account and must not have an exisiting
lead with the MOLTEN_REQUEST_RECORD_TYPE record type.
Can ' t have a contact account and must not have an exisiting lead with the MOLTEN_REQUEST_RECORD_TYPE record type .