search for: marks_en

Displaying 1 result from an estimated 1 matches for "marks_en".

Did you mean: markoren
2006 Apr 17
0
polymorphic association with single model as target
...es is defined like this: belongs_to :ref, :polymorphic => true I use the ref_id as foreign key (as in all the examples) and ref_type as INTEGER with a number defining the dictionary I''d like to refer too. Doing the "joins" myself as in the exemple below works well. @marks_en = DbDict.find(:all, :target => DBDICT_EN_TYPE, :joins => "as db inner join marks as ma on ma.ref_id = db.id", :conditions => "ma.ref_type = " + DBDICT_EN_TYPE.to_s) Doing a call to something like: @mark = Mark.find(par...