Hi guys.
Im completely new to rails and have trying to get my head around activerecord.
I have these ruby objects
With a mysql database to reflects this.Code:class Client < ActiveRecord::Base belongs_to :client_organisation end class ClientOrganisation < ActiveRecord::Base has_many :client end
what im trying to do is
Code:@client = Client.find(params[:id]) @client.client_organisation #this returns nil @client.client_organisation_id #this returns the right foreign key id
Now from my understand @client.client_organisation should return a ClientOrganisation object. Is there a method to make the @client load its relational objects? Is there anything else I am missing, off track on?
Thanks you the help
Alistair




but not in my live code.

Bookmarks