[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How to overwrite old scaffold to new one

Vikas Gholap

12/26/2008 7:18:00 AM

Hello all,

I am new to ruby development, so please me, and give me solution.

I am trying to develop simple shoppingcart application.
1) created rails application by

projects>rails ShoppingCart

2) then created database for shopping cart table-products

fields are- id, title, description, price, expiredate

3) created one Product scaffold by

projects>ShoppingCart>ruby script/generate scaffold Product title:string
description:text price:decimal expiredate:datetime

4)then i browse and did some new, edit, delete operations.

5) Now i want to add one field to my products table- image_url.
then fields are- id, title, description, price, expiredate, image_url.

I want to overwrite Product sacffold so that when i browse products page
it should display me added field i.e image_url.

give me steps to solve this problem.

Vikas
--
Posted via http://www.ruby-....

1 Answer

Tiago Nogueira

12/26/2008 11:43:00 AM

0

Hello man,
This link http://www.netbeans.org/kb/docs/ruby/rapid-ruby-w... have
exactly what you want
(i hope :-) )

Regards,
- tiago



On Fri, 26 Dec 2008 16:17:46 +0900, Vikas Gholap <vikasg@aflatune.com>
wrote:
> Hello all,
>
> I am new to ruby development, so please me, and give me solution.
>
> I am trying to develop simple shoppingcart application.
> 1) created rails application by
>
> projects>rails ShoppingCart
>
> 2) then created database for shopping cart table-products
>
> fields are- id, title, description, price, expiredate
>
> 3) created one Product scaffold by
>
> projects>ShoppingCart>ruby script/generate scaffold Product title:string
> description:text price:decimal expiredate:datetime
>
> 4)then i browse and did some new, edit, delete operations.
>
> 5) Now i want to add one field to my products table- image_url.
> then fields are- id, title, description, price, expiredate, image_url.
>
> I want to overwrite Product sacffold so that when i browse products page
> it should display me added field i.e image_url.
>
> give me steps to solve this problem.
>
> Vikas
> --
> Posted via http://www.ruby-....