Skip to content

Instantly share code, notes, and snippets.

@ticktricktrack
Created August 30, 2010 13:12
Show Gist options
  • Save ticktricktrack/557372 to your computer and use it in GitHub Desktop.
Save ticktricktrack/557372 to your computer and use it in GitHub Desktop.
Page.delete_all
Node.delete_all
p = Page.new(:name => "testbild")
root = Box.new(:height => 400, :width => 600)
grid1 = Grid.new(:height => 400, :width => 300, :align => "left")
grid2 = Grid.new(:height => 400, :width => 300, :align => "right")
grid3 = Grid.new(:height => 200, :width => 300, :align => "top")
grid4 = Grid.new(:height => 200, :width => 300, :align => "bottom")
root.children << grid1
root.children << grid2
grid1.children << grid3
grid1.children << grid4
p.zero_node = root
p.save
root.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment