@ -3,7 +3,7 @@ class BikesController < ApplicationController
before_action :authenticate_user!
def index
@bikes = Bike.all
@bikes = Bike.all.order(:log_number).reverse_order
@unsold_bikes = @bikes.select{ |bike|
!bike.date_sold &&
(bike.purpose == "Sale")
@ -3,6 +3,8 @@
%br
%h2 Bikes
= link_to "Log Bikes", new_bike_path
= link_to "View All Bikes", bikes_path
= link_to "Print Sale Bike Labels", print_select_bikes_path