Hi…
I would like to know what i ve done wrong in my association.
I have 4 Models.
user_info
company_info
department
role
Actually i want to get Particular user’s company,and which department he
belongs and what role he has…
These inforamtions i would like to get.
So i made association.
class CompanyInfo < ActiveRecord::Base
#-------------------------------------
has_one :user_info
class UserInfo < ActiveRecord::Base
belongs_to :company_info
belongs_to :department
belongs_to :role
#-------------------------------------
class Department < ActiveRecord::Base
has_one :user_info
#-------------------------------------
class Role < ActiveRecord::Base
has_one :user_info
#-------------------------------------
Now i can able to get department information for a paricular user and
role inforamtion for a particular user.
But i m unable to get Company information for a particular user.
What would be the Problem in my case.
Did i made anything wrong.
Pls help me.