1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-02-28 16:53:23 -05:00

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

This commit is contained in:
Jason Denney 2014-02-09 22:01:42 -05:00
parent 64d4186b57
commit 7b11da9583
2 changed files with 4 additions and 3 deletions

View File

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

View File

@ -12,8 +12,9 @@
%dd #{@bike.seat_tube_height} %dd #{@bike.seat_tube_height}
%dt Purpose %dt Purpose
%dd #{@bike.bike_purpose} %dd #{@bike.bike_purpose}
%dt Value - if !@bike.value.nil?
%dd #{@bike.value} %dt Value
%dd #{@bike.value}
- if !@bike.color.nil? - if !@bike.color.nil?
%dt Color %dt Color
%dd{ style: "width: 50px; background-color: ##{@bike.color}; border: black; border-width: 1px; border-style: solid;"} #{@bike.color} %dd{ style: "width: 50px; background-color: ##{@bike.color}; border: black; border-width: 1px; border-style: solid;"} #{@bike.color}