Bob Proulx wrote:
Sorry about that. I wasn't thinking.Norm Scherer wrote: I gave you both the sql and the models just to demonstrate that the database was correctly formed. That works like a charm! I do not understand the :include => { :space => :sitetype } syntax. What is that saying and why does it work?class Reservation < ActiveRecord::Base belongs_to :space endclass Space < ActiveRecord::Base belongs_to :sitetype end class Sitetype < ActiveRecord::Base end I looked at eager loading in Agile Web Development and did not really understand it all (obviously). I will look again at the api as recommended to see if that is any more understandable.Note that I didn't test this and so could have it wrong. See the "Eager loading of associations" in this reference for more details: http://rails.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html Thanks for the help.Bob Norm -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. |
- [Rails] Active record relationship problems Norm Scherer
- [Rails] Re: Active record relationship problems Bob Proulx
- Re: [Rails] Re: Active record relationship problems Norm Scherer
- [Rails] Re: Active record relationship problems Bob Proulx
- Re: [Rails] Re: Active record relationship p... Norm Scherer

