             @$el.find('.content').css 'max-height': max_height
 
         render: ->
-            data = @unit.toJSON()
+            data = @model.toJSON()
             template_string = jade.template 'details', data
             @el.innerHTML = template_string
             @set_max_height()


        initialize: (options) ->
            @parent = options.parent
            @unit = null

        close: (event) ->
            event.preventDefault()

            @details_view = new DetailsView
                el: @$el.find('#details-view-container')
                parent: @
                model: new models.Unit()

            return @el

