mirror of
https://github.com/fspc/bike-database.git
synced 2025-04-04 10:03:22 -04:00
lk | changes order of bikes and adds log bikes button to home page
This commit is contained in:
parent
2edbcb5bbf
commit
b480d7b405
@ -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
|
||||
%br
|
||||
= link_to "Log Bikes", new_bike_path
|
||||
%br
|
||||
= link_to "View All Bikes", bikes_path
|
||||
%br
|
||||
= link_to "Print Sale Bike Labels", print_select_bikes_path
|
||||
|
Loading…
x
Reference in New Issue
Block a user