# Record Mapping

**URL:** <https://www.ruby-forum.com/t/record-mapping/172493>\
**Category:** Rails\
**Created:** [July 22, 2009, 12:11pm UTC](https://www.ruby-forum.com/t/record-mapping/172493 "2009-07-22T12:11:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [July 22, 2009, 12:11pm UTC](https://www.ruby-forum.com/t/record-mapping/172493/1 "2009-07-22T12:11:54Z")

</div>

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 … ?

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [July 22, 2009, 2:21pm UTC](https://www.ruby-forum.com/t/record-mapping/172493/2 "2009-07-22T14:21:40Z")

</div>

Done …  
Thanks …

Hemant B. 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 … ?

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [July 22, 2009, 8:26pm UTC](https://www.ruby-forum.com/t/record-mapping/172493/3 "2009-07-22T20:26:22Z")

</div>

Hemant B. wrote:

> Done …  
> Thanks …
> 
> Hemant B. 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.

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [July 23, 2009, 8:23am UTC](https://www.ruby-forum.com/t/record-mapping/172493/4 "2009-07-23T08:23:39Z")

</div>

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 L. wrote:

> Hemant B. wrote:
> 
> > Done …  
> > Thanks …
> > 
> > Hemant B. 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.
