Really fix it
This commit is contained in:
parent
9c9511b95e
commit
aec212e754
2 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ ready = function() {
|
|||
barcode = $(this).find("input[type=number]").val();
|
||||
$("#from_barcode_form")[0].reset();
|
||||
$.ajax({
|
||||
url: "/barcodes/" + barcode,
|
||||
url: $("#from_barcode_form").data("url") + "/barcodes/" + barcode,
|
||||
success: function(data) {
|
||||
if (data != null) {
|
||||
increment_product(data["id"]);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
.col-md-6.col-md-offset-1.barcode-wrapper
|
||||
.center
|
||||
%h1 Order for #{@user.name}
|
||||
= form_tag nil, id: "from_barcode_form" do
|
||||
= form_tag nil, id: "from_barcode_form", data: { url: URI.join(root_url, "barcodes").to_s } do
|
||||
%input.center-block{ type: :number, name: :id, autofocus: true }
|
||||
= "- OR -"
|
||||
%button.btn.btn-default.center-block{ data: { toggle: :modal, target: "#products_modal" } }
|
||||
|
|
Loading…
Reference in a new issue