Re: [Maypole-dev] Maypole Model Class without corresponding database table

From: Tony Bowden (tony at kasei.com)
Date: Thu Dec 30 2004 - 22:20:55 GMT


On Thu, Dec 30, 2004 at 11:20:42AM -0800, Srinivasa Mullangi wrote:
> I am developing my first mypole application. It has a shopping cart.
> I created a table basket_item it has 3 columns: session_id, product_id, count.
> I want to create urls to view the cart (http://mysite.com/basket/view) and checkout cart (http://mysite.com/basket/checkout) etc.
> I dont have basket table. How do I create model classe without any corresponding database table.

You don't need a model class for your basket.

Your session should have_many basket_items. So to display a basket you
just want a view page for the relevant session.

Tony

_______________________________________________
maypole-dev mailing list
maypole-dev at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole-dev



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT