Ok .. I am having one more problem for you guyz .. :) Actually .. i am taking records into an array with command .. array = ModelName.find(:all, :conditions) .. And then again i have to give conditions on array records .. which i can access easily by for loop .. Can i do it .. ? -- Posted via http://www.ruby-forum.com/.
Done .. Thanks .. Hemant Bhargava wrote:> Ok .. I am having one more problem for you guyz .. :) > > Actually .. > i am taking records into an array with command .. > array = ModelName.find(:all, :conditions) .. > > And then again i have to give conditions on array records .. which i can > access easily by for loop .. > Can i do it .. ?-- Posted via http://www.ruby-forum.com/.
Hemant Bhargava wrote:> Done .. > Thanks .. > > Hemant Bhargava wrote: >> Ok .. I am having one more problem for you guyz .. :) >> >> Actually .. >> i am taking records into an array with command .. >> array = ModelName.find(:all, :conditions) .. >> >> And then again i have to give conditions on array records .. which i can >> access easily by for loop .. >> Can i do it .. ?if you put your solution down here, it would be useful for some one who is looking for answers to similar challenges. -- Posted via http://www.ruby-forum.com/.
i just compiled an for loop for array like this .. for record in array and then here had taken whatever i want .. :) like record.id end May not be the best solution but its fine .. Cheers .. Rails List wrote:> Hemant Bhargava wrote: >> Done .. >> Thanks .. >> >> Hemant Bhargava wrote: >>> Ok .. I am having one more problem for you guyz .. :) >>> >>> Actually .. >>> i am taking records into an array with command .. >>> array = ModelName.find(:all, :conditions) .. >>> >>> And then again i have to give conditions on array records .. which i can >>> access easily by for loop .. >>> Can i do it .. ? > > if you put your solution down here, it would be useful for some one who > is looking for answers to similar challenges.-- Posted via http://www.ruby-forum.com/.