I’m looking for a way to do something like:
ARObject.find_by_id(1, :include => :all)
--------- OR -----------
ARObject.find_by_id(1, :include => [:all])
…to load the object as well as ‘eager load’ all of its associations.
Is this possible?
I’m looking for a way to do something like:
ARObject.find_by_id(1, :include => :all)
--------- OR -----------
ARObject.find_by_id(1, :include => [:all])
…to load the object as well as ‘eager load’ all of its associations.
Is this possible?
What you may be looking for is:
ARObject.find_by_id(1, :Include => [:associated_model1,
:associated_model2])
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs