ksdaly/portfolio — pull request #26 by mauricio (2013-03-08 02:16:15+00:00)
Title: Getting nested comments to work

Let's go on in pieces:

First, the duplicates were because you were creating posts in the new method at your comments controller -> https://github.com/mauricio/portfolio/commit/918578fa6ddf162354c178b043e4bbe150c32d97#L1L28

Then, to get ancestry to work you need to create the migration that adds the ancestry field -> https://github.com/mauricio/portfolio/commit/918578fa6ddf162354c178b043e4bbe150c32d97#L6R1

And your form needed to use the @comment variable if it was set (as it is in the new method) -> https://github.com/mauricio/portfolio/commit/918578fa6ddf162354c178b043e4bbe150c32d97#L5R1

I also made some small changes, like fixing the password validation to only kick in if needed ( https://github.com/mauricio/portfolio/commit/918578fa6ddf162354c178b043e4bbe150c32d97#L4R20 ) and some small formatting/unnecessary code cleanups.