ruby - Editing new products in my seeds.rb file creates a copy instead of editing the file I changed -


i'm new ruby , rails appreciate feedback. in web application, have 6 products added products page through seeds.rb file encountered problem every time try edit 1 of them.

once i'm done edit, run rake db:seed , reload webpage (local host) instead of showing edit on item changed, new version of updated item shows instead of running edit. example, if change color of 1 of bikes , save changes in seeds.rb file, run rake db:seed , reload page, copy of item edited shows instead of changing color field on existing item.

code in seeds.rb

web app

i wondering if there i'm missing. solution has been delete product through "destroy" button on page , run rake db:seed again. if i'm doing wrong, i'd appreciate if guys point me in right direction. thanks!

try doing rake db:reset after edit seeds.rb. although it's worth noting rake:seeds reserved initial creation of app. should editing through app (using localhost:3000/products/:id/edit ).


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -