search for: add_pric

Displaying 4 results from an estimated 4 matches for "add_pric".

Did you mean: add_price
2006 Aug 04
8
Demo in rails2.pdf of add_price migration, PostgreSQL 8.1.4
People, I''m looking at the migrate example on p 74 of the rails2.pdf It''s a simple example of using a migration to add a column to the products table. Here is a copy of the migration file named 002_add_price.rb after I generated and then edited it: class AddPrice < ActiveRecord::Migration def self.up add_column :products, :price, :decimal, :precision => 8, :scale => 2, :default => 0 end def self.down remove_column :products, :price end end I see this error when I walk t...
2007 Feb 09
0
rake aborted!!
...t.column :title, :string t.column :description, :text t.column :image_url, :string end end def self.down drop_table :products end end This has created a table no problem. I''ve then added another column using the following ruby script/generate migration add_price This has worked. class AddPrice < ActiveRecord::Migration def self.up add_column :products, :price, :decimal, :precision =>8, :scale =>2, :default =>0 end def self.down remove_column :products, :price end end After creating the 002 migration file above and running...
2006 Aug 16
6
Newbie-Question
Hi. I''ve just started using Ruby on Rails. Now I''ve got my first problem. I generated a new migration ''add_price'' and get the message: D:\ruby\work\depot>rake db:migrate (in...
2006 Jun 06
15
error working through Agile !!!
Hi everyone, I''m working my way thru the ''Depot'' project from Agile Web Development with Rails. I got to the bit where I type: ruby script/generate scaffold Product admin And I get the following error: error Before updating scaffolding from new DB schema, try creating a table for your model (Product) ( on the last line ! ) Now I have followed everything as