hi people
I've follow this tutorial: http://railscasts.com/episodes/262-trees-with-ancestry
when I tried to make the "arrange (:order => :id)" I got this message
undefined method `arrange' for #<Array:0x8c19780>
Extracted source (around line #4):
1:
2: <h1>Listing categories</h1>
3:
4: <%= nested_categories @categories.arrange(:order => :id) %>
5:
6: <br />
7:
Can you help me, please?
Thanks!
I'm using the ancestry Gem , and it works fine for me. e.g.:
You need to run it on your Categories class itself -- it's a class method
try it out in the Rails console!