mirror of https://github.com/fspc/BikeShed-1.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
479 B
17 lines
479 B
class BikesController < AuthenticatedController
|
|
|
|
def new
|
|
@bike = Bike.new bike_purpose_id: 1
|
|
@brands = BikeBrand.all.map{ |b| [b.brand, b.id] }
|
|
@brands.unshift( ["Select a brand", -1] )
|
|
@wheel_sizes = BikeWheelSize.all.map{ |w| [w.display_string, w.id] }
|
|
@wheel_sizes.unshift( ["Select a wheel size", -1] )
|
|
end
|
|
|
|
def show
|
|
@bike = Bike.find_by_id(params[:id])
|
|
@task_list = @bike.task_list
|
|
@show_add_bike = true if params[:add_bike]
|
|
end
|
|
|
|
end
|
|
|