0

So I'm using this plugin: jquery-in-place-editor, I'm trying to make a POST request according to the docs, but I'm not sure what URL to do the POST to, I can't seem to get it right.

If I'm in the show view for the object, which in this case the path is: /quote_line_items/90

But when the script executes I get this error: No action responded to 90. Actions: create, destroy, edit, index, new, show, and update

Which URL would I want to put in the scripts url: parameter?

Update

I just tried this.

$(".editable").editInPlace({
  url: "/quote_line_items/update",
  show_buttons: true
});

And I also tried:

$(".editable").editInPlace({
  url: "/quote_line_items/update/90",
  show_buttons: true
});

just to see what would happen, however, after the form is submitted it shows the show action for that page in an Iframe where the form was, which makes sense I suppose, like it did a GET request or something.

1
  • 1
    I'd assume that it's /quote_line_items/update/90 Commented Nov 28, 2009 at 0:45

2 Answers 2

1

You probably want to do a post with _method as a parameter having the value update that is if you are doing restful routes.

Otherwise I would point to /quote_line_items/update with a post.

Sign up to request clarification or add additional context in comments.

2 Comments

I tried this, I dont think that makes sense, like as a URL param? so it'd be `/quote_line_items/update/90?_method=post
meh, I switched to a different plugin, issue was my nested attrs from within that model. Switching fixed it, but you helped the most.. so uh.. you get a win in the books.
1

It looks like you moved on, but I do have an answer for you.

If quote_line_items is a map.resources, then what you want is a PUT to /quote_line_items/:id jquery-edit-in-place does a post, but what you want is a put, which you can fake with the _method attribute, so try this url: '/quote_line_items/90?_method=put'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.