How to configure default table columns in awesone_nested_set

68 Views Asked by At

Awesome_nested_set gem comes with default columns

:parent_id
:lft
:right

How can I configure them that is use different names for them.

1

There are 1 best solutions below

0
vich On

From the awesome_nested_set gem README:

You can pass various options to acts_as_nested_set macro. Configuration options are:

  • parent_column: specifies the column name to use for keeping the position integer (default: parent_id)
  • left_column: column name for left boundary data (default: lft)
  • right_column: column name for right boundary data (default: rgt)