Re: Help w/ pulling data from 2 tables and displaying the results
Problem solved!
Ok - I finally buckled down and asked a couple of questions and there
was a method in the accounts model that was killing this whole concept:
Problem solved!
The project I'm building a little addition to is huge and extremely complex so there's a lot of code that could overide or clash w/ code I'm trying to develop.
That was the case here. In the Account model there was this method that was overiding my join attempts.
def spaces
spaces = Space.find :all, :conditions => ['owner_id = ?',
self.user_id]
end
Now, once I got rid of that method - this works perfectly!
@accounts = Account.find(:all, :include => :spaces, :limit => 20)
I got dumped right into the fire w/ this new project - it pays to ask a few simple questions. I tore a lot of hair out trying to figure it out, but also learned a great deal trying to find the answer.
posts!
Cheers!
Subject
Written By
Posted
December 17, 2006 06:44PM
Re: Help w/ pulling data from 2 tables and displaying the results
December 19, 2006 12:58PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.