         currentView.area.set(response)
         currentView.purgeContent()
         currentView.drawContent()
-        refreshUl $("ul.ui-model-blocks", currentView.el)
+        refreshUl $("ul.blocks-" + currentView.cid, currentView.el)
 
   confirmRemoveBlock: (event) ->
     if @area.get("blocks").length > 0

    $("ul.blocks-" + @cid, @el).append blockView.render().el

  sendBlockData: (event)->
    if $("ul.ui-model-areas", @el).length == 0
      ul = $(event.target)
      refreshUl ul
      blocks = ul.children()
      blockData = []
      for block in blocks
        if $('div[data-node-id]', block).length > 0
          blockData.push({'node_id' : $('div[data-node-id]', block)[0].getAttribute('data-node-id'), 'block_id' : $('div[data-block-id]', block)[0].getAttribute('data-block-id')})
        else if $('div[data-block-type]', block).length > 0
          blockData.push({'component' : $('div[data-block-type]', block)[0].getAttribute('data-block-type')})
      areaData = {}
      areaData['blocks'] = blockData
      mustRefresh = !! ul.find(".newly-inserted").length > 0
      currentView = this
      $.ajax
        url: @area.get('links')._self_block
        method: 'POST'
        data: JSON.stringify(areaData)
        success: (response) ->
          currentView.refresh() if mustRefresh

  refresh: ->
    currentView = this

    this

  purgeContent: ->
    $("ul.areas-" + @cid, @el).empty()
    $("ul.blocks-" + @cid, @el).empty()

  addAreaToView: (area) ->
    areaElement = new Area()
