How to overwrite old scaffold to new one

V

Vikas Gholap

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top