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

Added bike show and show view

This commit is contained in:
Jason Denney 2014-02-09 19:11:08 -05:00
parent d0c05a0244
commit c6a3ed9991
2 changed files with 28 additions and 1 deletions

View File

@ -7,4 +7,8 @@ class BikesController < AuthenticatedController
@wheel_sizes.unshift( ["Select a wheel size", -1] )
end
def show
@bike = Bike.find_by_id(params[:id])
end
end

View File

@ -1 +1,24 @@
Bike Show
%h2 #{@bike.shop_id}: #{@bike.bike_brand} - #{@bike.model}
%dl.dl-horizontal
%dt Shop ID
%dd #{@bike.shop_id}
%dt Brand
%dd #{@bike.bike_brand}
%dt Model
%dd #{@bike.model}
%dt Type
%dd #{@bike.bike_style}
%dt Wheel Size
%dd #{@bike.bike_wheel_size.display_string}
%dt Condition
%dd #{@bike.bike_condition}
%dt Seat Tube (cm)
%dd #{@bike.seat_tube_height}
%dt Purpose
%dd #{@bike.bike_purpose}
%dt Value
%dd #{@bike.value}
- if !@bike.color.nil?
%dt Color
%dd{ style: "background-color: ##{@bike.color}; border: black; border-width: 1px; border-style: solid;"} #{@bike.color}