--- /dev/null
+class AddTestData < ActiveRecord::Migration
+ def self.up
+ Product.delete_all
+
+ Product.create(:title => 'Snowball',
+ :description =>
+ %{<p>
+ The perfect gift for a hot summer's day. What could be better
+ than to surprise a loved one a gift of winter coolness? This
+ snowball has been loving crafted from the purest snow, hand-collected
+ from the pristine lawn of our back garden.
+ </p>
+ <p>
+ Note that this is a perisiable item and some melting may occur
+ while the snowball is in transit.
+ </p>
+ },
+ :image_url => '/images/snowball.jpg',
+ :price => 12.00,
+ :date_available => Time.utc(2008, 12, 31)
+ )
+
+ Product.create(:title => 'Daisy',
+ :description =>
+ %{<p>
+ All the world is better for having flowers in it. And your home
+ will be the better for having this fine example of <i>Bellis
+ perennis</i> gracing its walls. The range of uses of this item are
+ truly remarkable. You can place it in an eggcup of water, you can
+ insert it in a jacket for a subtle buttonhole posy, or you even
+ purchase a multi-pack to create your own daisy chain!
+ </p>
+ },
+ :image_url => '/images/daisy.gif',
+ :price => 5.00,
+ :date_available => Time.utc(2011, 7, 1)
+ )
+
+ Product.create(:title => 'Cardboard Box',
+ :description =>
+ %{<p>The gift that keeps on giving, you'll wonder how you ever did
+ without a cardboard box in your home. Us it for a range of uses,
+ including putting things in and keeping things in. We can provide
+ you with a cardboard box that is versatile and suitable for any
+ occasion. Some of our directors even use them for sleeping in!
+ </p>
+ },
+ :image_url => '/images/cardboard-box.jpg',
+ :price => 10.00,
+ :date_available => Time.utc(2007, 1, 1)
+ )
+
+ Product.create(:title => 'Air',
+ :description =>
+ %{<p>An essential for all activities, <i>Air</i> is vital for your
+ wellbeing and vitality. Our air is carefully packaged to contain
+ only 100% pure air, with no artificial colours or preservatives.
+ </p>
+ <p>May contain nuts.
+ </p>
+ },
+ :image_url => '/images/can-of-air.jpg',
+ :price => 5000.00,
+ :date_available => Time.utc(2009, 1, 1)
+ )
+ end
+
+ def self.down
+ Product.delete_all
+ end
+end