   # @param [Object] data      context data for partial
   # @param [String] selector  optional CSS selector into which the partial view will be rendered
   #
-  # @return [String] rendered template data (HTML)
+  # @return [Object] view instance
   partial: (clazz, data, selector) ->
     v = @create_partial(clazz, data)
     if selector?


    link_events = @events || {}

    _.each @links, (link, sel) ->

      _.each @$(sel), (el) ->

        state = link[0]
        data = null

        url = s.create_url()
        url = "/" + url if url.charAt(0) != '/'

        @$(el).attr("href", url)

    # bind events
    @delegateEvents(link_events)
