Calling same modelling will fire multiple queries to db in rails 2.3.5?

Hi,
I have a user and address model.

In one of my view I am using “@user.address” 5 times.

My question is weather will it fire 5 different queries to the database?

Thanks,
Tushar

nope :slight_smile:

On Mon, Jan 2, 2012 at 1:10 PM, Tushar G. [email protected]invalid
wrote:


sαη∂ιρ Rαηѕιηg


www.funonrails.com

twitter, github @sandipransing
skype sandip.ransing

why so? any reason behind it.

Thanks,
Tushar

Hai!

can you try this way:

@user[0].address
@user[1].address
@user[2].address
@user[3].address
@user[4].address

bye :slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs