Skip to content

$.Model.delete URL cannot be templated beyond {id} #130

Description

@josephtate
// The $.Model.destroy method

            return function( id, success, error ) {
                var attrs = {};
                attrs[this.id] = id;
                return ajax( str || this._shortName+"/{"+this.id+"}", attrs, success, error, fixture(this, "Destroy", "-restDestroy"), "delete")
            }

As you can see the attrs is stripped down, so the rest of the attrs are unavailable for URL substitution.

My REST server uses nested urls to denote hierarchy; /document/3/property/7 (represented as "{docUrl}/property/{id}/"), etc. I need to be able to operate on different urls based on the document context, but I have to write a custom delete so that I can substitute the URL properly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions