fix blocks to change

This commit is contained in:
Torsten Ruger
2015-08-22 18:37:42 +02:00
parent b43bffc940
commit b8a0e5f8a3
4 changed files with 32 additions and 25 deletions

View File

@ -14,7 +14,7 @@ class ListView < ElementView
end
# create a root node acording to the "root" function (default div)
# draw all chilren and keep the elements as @elements
# draw all children and keep the elements as @elements
# return (as per base class) the single root of the collection
def draw
@element = div(self.root)
@ -34,4 +34,11 @@ class ListView < ElementView
@elements[index] = rendered
old.replace_with rendered
end
def append view
@children << view
rendered = view.draw
@elements << rendered
@element << rendered
end
end