collectiveidea / awesome_nested_set

An awesome replacement for acts_as_nested_set and better_nested_set.
MIT License
2.39k stars 492 forks source link

view helper returns empty select list #417

Closed mices closed 4 years ago

mices commented 4 years ago

Using the view helper where

@category=Category.new 

I get an empty set from this code taken from your page

<%= f.select :parent_id, nested_set_options(Category, @category) {|i| "#{'-' * i.level} #{i.name}" } %>

How is the helper supposed to be constructed for a select list of all categories