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

$ = jQuery

class Message extends Backbone.View
    className: 'message alert'
    
    defaults:
        hideAfter: 10
        scroll: true

        return actions

    template: (ctx) ->
        $message = "<div class='message alert #{ opts.type } alert-#{ opts.type }'>#{ opts.message }</div>"

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