All threads / rails binary tree and referral

Ask A Question

Notifications

You’re not receiving notifications from this thread.

rails binary tree and referral

mustafa kahveci asked in General

Hi, i have an application and that is working clear but i wanna add multi level marketing binary tree module to my application.

i created binarytree page and also created add_to_column to members as below
parent_id:string
left_id:string
right_id:string
referral_by_id:string
added_by_id:string

then i did migrated to database

also already generated current_user.sn for referral before migrate

how can i make to these on binarytree page
current_user = parent or if click to user of binary tree it will be parent then show tree of them
left_id and right_id need select for tree from added_by_id
referral_by_id button with checker

i wanna mean binary tree page need referral button for add referrer if user added referrer buton will visible automaticly because all user can add one referrer
also how can i make referral_link for example "www.domain.com/signup with referral id"(referral_by_id = current_user.sn = 8 digits )
if can anybody help please?
kindly thank's
Regards

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,629+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.