On 13 September 2012 22:48, Kyle A. <li...@ruby-forum.com> wrote: > Colin Law wrote in post #1075908: >> On 13 September 2012 21:51, Kyle A. <li...@ruby-forum.com> wrote: >>>>> I am lost. >>> >>> Yes. I am 100% sure I understand the full usage of the gem and have >>> tripple checked documentation, stack over flow and other blogs, its not >>> an issue with the gem, its an issue with my code. >>> >>> it boils down to two things: >>> >>> position_id spazzes out if it is not an accessible attribute, which in >>> the documentation plus the examples I have read and followed - does not >>> need to be. >> >> That could be an issue with the version of Rails you are using, I >> asked which one it is. >> >>> >>> ancestry seems to always be nil and because of this comments are not >>> nesting properly. so I am wondering how to make sure it gets set - >>> according to the documentation it should just be set when ever you reply >>> to a comment, because it uses the parent comments id to do so. >>> >>> So I am wondering whats wrong with my code for this to not work >.< >> >> Which line of your code is not doing the correct thing? >> >> Colin > > > Sorry Colin, if it was a one line issue I wouldn't bother with mailing > lists, I would double check the code. this is "what’s wrong with my > code" issue, hence why I posted gist. and ancestry works with 3.2 I know > that much, but thanks for your help
It may not be a single line problem but it is certainly not necessary to look at the whole code. The first principle of debugging is to narrow down the problem. Have you determined whether the correct data are getting stored in the database? If not then concentrate on that first. If the problem is that the data are not getting stored properly then that narrows it down to the sections of code that get the data into the database, if the correct data are getting stored then the problem is a problem with viewing the data. Either way you have halved the extent of the code you need to look at. To track down the problem with parent_id then remove it from attr_accessible and post the full failure message and the bit of development.log that corresponds to the action that generates the error. Colin Colin > > any one else? > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.