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.
class Client < ActiveRecord::Base
class ClientOrganisation < ActiveRecord::Base
what im trying to do is
@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