# Updating model

**URL:** <https://www.ruby-forum.com/t/updating-model/129192>\
**Category:** Rails\
**Created:** [February 15, 2008, 8:34am UTC](https://www.ruby-forum.com/t/updating-model/129192 "2008-02-15T08:34:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishyanand](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/e36b37/32.png) [@vishyanand](https://www.ruby-forum.com/u/vishyanand)\
**Post date:** [February 15, 2008, 8:34am UTC](https://www.ruby-forum.com/t/updating-model/129192/1 "2008-02-15T08:34:12Z")

</div>

I am following agile web development with rails.I faced some problems,as  
there are some changes related to default database and scaffolding.I was  
able to resolve these problems.My issue is this-i added a migration to  
“add price column” to product table,and ran the migration.All  
fine.But,my model is not being updated.How to update the model,so that  
view also reflects the new price column.  
thks

---

<div class="post-metadata">

**Author:** ![vishyanand](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/e36b37/32.png) [@vishyanand](https://www.ruby-forum.com/u/vishyanand)\
**Post date:** [February 15, 2008, 10:05am UTC](https://www.ruby-forum.com/t/updating-model/129192/2 "2008-02-15T10:05:06Z")

</div>

Vishal Sodani wrote:

> I am following agile web development with rails.I faced some problems,as  
> there are some changes related to default database and scaffolding.I was  
> able to resolve these problems.My issue is this-i added a migration to  
> “add price column” to product table,and ran the migration.All  
> fine.But,my model is not being updated.How to update the model,so that  
> view also reflects the new price column.  
> thks

The view is not displaying price column.When,I add new product from  
view,default value of price,which is zero,is used while inserting.
