I’m trying to access data from the skins table (see below) through a
nested include
with no luck. The association is all through imageasset but I do not
know how to figure it out. Any help is highly appreciated.
######the controller code#######
@furnii_from_furnii = Furni.find :all, :include => [{:raider =>
:imageasset}, :skin ] , :conditions =>
“”+Furni.conditions_by_like(@search)+" OR "
+Raider.conditions_by_like(@search) + “OR”
+Skin.conditions_by_like(@search) + “”
#######I have 4 models set up this way (did only include the necessary
code )#######
class Furni < ActiveRecord::Base
belongs_to :imageasset
belongs_to :raider, :foreign_key => “original_raider_id”
end
class Raider < ActiveRecord::Base
belongs_to :imageasset
end
class Skin < ActiveRecord::Base
belongs_to :imageasset
end
class Imageasset
nothing
end