From: Subashini Kumar Date: 2009-09-22T21:45:49+09:00 Subject: Re: Accessing an instance variable in another method Paul Smith wrote: > On Tue, Sep 22, 2009 at 1:28 PM, Subashini Kumar > wrote: >> displaying the #question to user >> # here i want to access the @quiz object which is a set of questions i >> have #retreived from the database.Hot to access it? > > Just use @quiz. That's the point of instance variables. However, you > have to make sure that checkanswer is being called at some point after > index has been called, and I'm no Rails aficionado. > >> �end > -- > Paul Smith > http://www.nomadicfun.co.uk > > paul@pollyandpaul.co.uk Hi, No that doesnt work.. When i try to access @quiz.each {} i get an error like "there is no each method defined" -- Posted via http://www.ruby-forum.com/.