# -*- encoding : utf-8 -*-
class CreateHomePage < ActiveRecord::Migration
	def self.up

		@home = Home.create(:slug => "root")
		
		@home.slider = Slider.create
		
		@home.home_blocks <<  HomeBlock.create(:slug => "left_block")
		@home.home_blocks <<  HomeBlock.create(:slug => "right_block")
		
		
		@home.save
		
		

	end

	def self.down
		Home.find_by_slug("root").destroy
		
	end
end
