Browse Source

Forward url on add bike/ don't display value if nil

denney-fix-saving-dates
Jason Denney 11 years ago
parent
commit
7b11da9583
  1. 2
      app/assets/javascripts/bikes.js
  2. 1
      app/views/bikes/show.html.haml

2
app/assets/javascripts/bikes.js

@ -20,7 +20,7 @@ $("#add_bike_submit").click(function(){
data: json_data,
dataType: "json",
success: function(data, status, xhr){
//window.location = "";
window.location = "/bikes/"+ data.bike.id;
},
error: function(data, status ){
displayFormErrors(data.responseJSON);

1
app/views/bikes/show.html.haml

@ -12,6 +12,7 @@
%dd #{@bike.seat_tube_height}
%dt Purpose
%dd #{@bike.bike_purpose}
- if !@bike.value.nil?
%dt Value
%dd #{@bike.value}
- if !@bike.color.nil?

Loading…
Cancel
Save