       $("input[data-k-uuid='" + @uuid + "'][data-attr='" + attr + "']").data("val", val)
 
   append_data_model: ->
-    model_div = "<div data-k-uuid=" + @uuid + " data-id=" + @id + " data-class=" + @model.replace("-", "_") + " data-parent-type=" + @parent + " data-parent-id=" + @parent_id + "></div>"
+    model_div = "<div data-k-uuid=" + @uuid + " data-id=" + @id + " data-class=" + @model_name.replace("-", "_") + " data-parent-type=" + @parent + " data-parent-id=" + @parent_id + "></div>"
     $("[data-kindred-model]").append(model_div)

      @update_data_vals()

  destroy: ->
    @route ||= @model.replace("-", "_") + "s"
    url = "/" + @route + "/" + @id + ".json"
    method = "DELETE"


class App.Base
  constructor: (@opts) ->
    @opts ||= {}

    dash_str = @constructor.name.replace /([A-Z])/g, ($1) ->
      "-" + $1.toLowerCase()
    @model_name = dash_str[1 .. dash_str.length - 1]

    # @binder = new App.DataBinder(@id, @model_name)
    @attributes = {}
    template = @opts.template || App[@constructor.name].template

