I have been working on implementing the Ancestry gem in my rails app, I have almost got it working the way I want it to.
I am having problems with the following line of code from the Ancestry README docs.
TreeNode.find_by_name('Crunchy').subtree.arrange
The code that I am using in my app is as follows:
Message.find_by_name('FedEx').@messages.arrange
With this, I am getting an error message:
syntax error, unexpected tIVAR
...find_by_name('FedEx').@messages.arrange );@output_buffer.saf...
...
Can anyone tell me what I am doing wrong, or explain to me what TreeNode and subtree should be replaced with?
I belive what you want is:
Message.find_by_name('FedEx').subtree.arrange.Messageclass should implement ancestry viahas_ancestryaccording to the README.