From 84435d2f3056b970419d00e1291f654701e86f89 Mon Sep 17 00:00:00 2001 From: LeandroNunes Date: Fri, 6 Jul 2007 14:11:16 +0000 Subject: [PATCH] ActionItem0: Adding blocks to compose the layout of webs --- app/models/block.rb | 2 ++ db/migrate/005_create_blocks.rb | 12 ++++++++++++ public/images/loading.gif | Bin 0 -> 1787 bytes test/fixtures/blocks.yml | 25 +++++++++++++++++++++++++ test/unit/block_test.rb | 10 ++++++++++ 5 files changed, 49 insertions(+), 0 deletions(-) create mode 100644 app/models/block.rb create mode 100644 db/migrate/005_create_blocks.rb create mode 100644 public/images/loading.gif create mode 100644 test/fixtures/blocks.yml create mode 100644 test/unit/block_test.rb diff --git a/app/models/block.rb b/app/models/block.rb new file mode 100644 index 0000000..5d52a14 --- /dev/null +++ b/app/models/block.rb @@ -0,0 +1,2 @@ +class Block < ActiveRecord::Base +end diff --git a/db/migrate/005_create_blocks.rb b/db/migrate/005_create_blocks.rb new file mode 100644 index 0000000..cbd027e --- /dev/null +++ b/db/migrate/005_create_blocks.rb @@ -0,0 +1,12 @@ +class CreateBlocks < ActiveRecord::Migration + def self.up + create_table :blocks do |t| + t.column :box_id, :integer + t.column :position, :integer + end + end + + def self.down + drop_table :blocks + end +end diff --git a/public/images/loading.gif b/public/images/loading.gif new file mode 100644 index 0000000..5bb90fd Binary files /dev/null and b/public/images/loading.gif differ diff --git a/test/fixtures/blocks.yml b/test/fixtures/blocks.yml new file mode 100644 index 0000000..9859ca9 --- /dev/null +++ b/test/fixtures/blocks.yml @@ -0,0 +1,25 @@ +# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html +one: + id: 1 + box_id: 1 + position: 1 +two: + id: 2 + box_id: 1 + position: 2 +three: + id: 3 + box_id: 1 + position: 3 +four: + id: 4 + box_id: 2 + position: 1 +five: + id: 5 + box_id: 3 + position: 1 +six: + id: 6 + box_id: 3 + position: 2 diff --git a/test/unit/block_test.rb b/test/unit/block_test.rb new file mode 100644 index 0000000..83c97a9 --- /dev/null +++ b/test/unit/block_test.rb @@ -0,0 +1,10 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class BlockTest < Test::Unit::TestCase + fixtures :blocks + + # Replace this with your real tests. + def test_truth + assert true + end +end -- libgit2 0.21.2