Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Tobias's Profile

GitHub User: TobiFrano

Comments by Tobias

Avatar

Never mind, must have been too little sleep. Using a class_name solves it.

Avatar

I have a problem with nested forms and a polymorphic model. Using comments as an example, how does one add multiple has_many :through for the comments needed.
Example:

has_many :comments, :through => :images
has_many :comments, :through => :articles

The second has_many overwrites the first one and :through only allows one reference.

Any tips appreciated.