Hi, I have a tree structure. I use the awesome nested set of plugins. how to add nodes to children at different levels. Please help me. I want to add, edit and delete nodes at all levels.
Can someone help me for the same thing?
To add children, just call
item.children.create(:name => "new item")
or
new_item = Item.new(:name => "new item") item.children << new_item
You can find all the methods for managing the nested model in the source code of the plugin 1
http://github.com/collectiveidea/awesome_nested_set/blob/master/lib/awesome_nested_set.rb
Source: https://habr.com/ru/post/1736768/More articles:How are keys used in encryption algorithms? - cryptographyHow to write an array to sqlite database for Objective-C? - sqliteA specific string format with a number and a character together representing a specific element - c ++Checking a row in a table in SQL Server - CLR or T-SQL function (question updated) - sqlWhy can't I create this Javascript object? - jsonConverting a line number to a sequence of digits -.Net 2.0 - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1736770/how-to-pass-the-parameters-to-the-urlconnection-in-javaandroid&usg=ALkJrhjf-YTtZZChFl_8Yk7Cs77Qod44OQWhy is jQuery.load () run twice? - javascriptMixing standard C ++ strings and window APIs - c ++An item with the same key has already been added - c #All Articles