From: BlueHandTalking Date: 2010-01-13T05:35:07+09:00 Subject: Re: NOOB Question on Instance Variable Hi there Phil, Yes everything was exact. I did once more check out my record I was testing with, and found out that the project_id had been deleted in the middle of my tests, and that was the error. Thanks again for all the help. Cheers, Jet On Jan 12, 12:02 pm, Phillip Gawlowski wrote: > On 12.01.2010 20:55, BlueHandTalking wrote: > > > Hello Phillip, > > >> *Is* it the exact same code? > > > Yes, > [...] > > I change code in the class and where I call it in my > > application when I test. > > Obviously, the code is different then, is it not? > > To clarify: If we ask for exactness, we *mean* exactness. No changes, no > nothing, but 100% identical code. > > >> Do you search for @displayphoto before or > >> after doing a #build_photo call? > > > Not sure what you mean by doing a search for @displayphoto, > > but I am using @displayphoto in my code, if thats what you meand. > > So, you do a DB search for @displayrecords before actually creating a DB > record, and are surprised that that search returns nil? Then you create > a DB record, and are surprised that you find something? > > The name of an instance variable is utterly irrelevant. You can > substitute @displayphoto with @foo, and @photo with @bar, and still get > the same results. > > >> Do you *have* records in your database > >> to search for and thus get a result set? > > > Yes, as I mentioned in my first post, everything works > > correctly if the instance is named @photo. > > Not an answer. Are there actual records in the database that you can > find? Before creating a record in your code? > > -- > Phillip Gawlowski