             actions: do @parseActions
 
         @$el.addClass "#{ opts.type } alert-#{ opts.type }"
-        @template opts
+        @$el.html @template opts
 
         @rendered = true
 

        return actions

    template: (ctx) ->
        @$el.html ctx.message

        $actions = $ '<div>'
        $actions.addClass actions
        for action in ctx.actions
            $action = $ '<span>'
            $action.attr 'data-action', action.name

$ = jQuery

class Message extends Backbone.View
    defaults:
        hideAfter: 10
        scroll: true
