Topic: connecting subcategories to categories?
How would this type of URI convention be done with rails:
site.com/catalog/category/subcategory/view/item_id
site.com/catalog/category/view/item_id (if it does not belong to a subcategory)
The only part that I do not know how to do is the subcategory model. Is there something I can define in categories_controller.rb to go to subcategories_controller.rb for category/subcategory?
I have tried something similar to: (in categories_controller.rb)
def subcategory
redirect_to :controller => subcategory
end
but that did not work - and I dont know anything about redirecting to, or rendering another controller. Any input will be helpful!