Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4826

Save object to nested route

$
0
0

@hectorsq wrote:

I have a document model which has many signatures. The idea is to sign the document using a userName and password.

I GET the document from /documents/:doumentId

In the document template I show an empty form with user and password input fields and a button.

When the user clicks the button a signDocument action is handled in the document’s controller, where I create a new signature object and save it.

However the POST message is sent to /signatures and not to do /document/:id/signatures.

My router is as follows:

Router.map(function() {
  this.route("document", { path: "/documents/:document_id" }, function() {
    this.route("signatures");
  });
});

The document and signatures are shown using the document template, I am not using the signatures template

What am I missing?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles