Referencing belongs_to association of a belongs_to association?

Has_one(association_id, options = {}) Specifies a one-to-one association with another class. This method should only be used if the other class contains the foreign key. If the current class contains the foreign key, then you should use belongs_to instead.

See also ActiveRecord::Associations::ClassMethods’s overview on when to use has_one and when to use belongs_to.

I forgot to add the has_many association in my question originally. – Mnton Dec 3 '10 at 21:31.

Rather than defining a method to do this, delegate! In app/models/c. Rb: delegate :title, :to => :b And then in app/models/b.

Rb: delegate :title, :to => :a.

I had to turn the class B title method into a class method to get it to work.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions