I installed ancestry gem successfully following instruction from https://github.com/stefankroes/ancestry and my Categories table look like this:
Categories(id, category_name, ancestry, created_at, updated_at)
I want to make select based on parent->sub-category->sub-sub-category:
At this point with code(taken from https://github.com/stefankroes/ancestry/wiki/Creating-a-selectbox-for-a-form-using-ancestry) i can only manage to get following which is not correct.
Your data is wrong. To model this structure you should have ancestry column properly filled-in. It should contain whole path from the root node (ids of the elements) sepatared by '/'. For example for Watches it should be 5/13 so as it was displayed under Clothes (Id: 13)