     if @opts?
       $.each @opts, (key, val) =>
         @set key, val
+
+  _setup_route: =>
+    url_match = new RegExp(/{{([^{}]+)}}/g)
+    @route ||= App[@constructor.name].route
+    @route ||= "/" + @snake_name + "s"
+    @route = @route.replace(url_match, (match, p1) =>
+      attribute = match.slice(2, - 2)
+      @get(attribute)
+    )

    template = @opts.template || App[@constructor.name].template

    @_set_opts_to_attributes()

    @uuid = @opts.uuid || @attributes.uuid || App.UUID.generate()
    @id = @opts.id || @attributes.id

  constructor: (@opts) ->
    @_set_name_properties()
    @_set_self()

    @opts ||= {}

