Displaying 1 result from an estimated 1 matches for "subcategory1".
Did you mean:
subcategory
2010 May 25
2
Site Navigation With Polymorphic Has Many Through
...which
contained the position of the child in relation to it''s siblings, where the
parent and the child were polymorphic. Then a given childable object can
find it''s parentable by going through the menu_items table.
I want my nav to be able to do things like this:
--Category1
----SubCategory1
------Product1
------Product2
----Product3
--Category2
----Product4
--Page1
--Page2
--Page3
This is the current setup:
MODELS
class MenuItem < ActiveRecord::Base
belongs_to :childable , :polymorphic => true
belongs_to :parentable , :polymorphic => true
acts_as_list :scope =>...