diff --git a/app/assets/javascripts/bikes.js b/app/assets/javascripts/bikes.js index 6d42c4f..f2398ea 100644 --- a/app/assets/javascripts/bikes.js +++ b/app/assets/javascripts/bikes.js @@ -21,7 +21,7 @@ $("#add_bike_submit").click(function(){ contentType: 'application/json', dataType: "json", success: function(data, status, xhr){ - window.location = data.bikes[0].href; + window.location = data.bikes[0].id; }, error: function(data, status ){ displayFormErrors(data.responseJSON);