mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 16:41:38 -04:00
lk | adds links to previous and next bikes on bike edit page and removes
bike#show route
This commit is contained in:
@@ -5,6 +5,12 @@
|
||||
.col-sm-3.col-sm-offset-3
|
||||
=button_to "Mark as sold", {action: "mark_as_sold", id: @bike.id}, method: :patch, class: "btn btn-default"
|
||||
= render 'edit_form'
|
||||
= link_to 'Show', @bike
|
||||
- if @next_bike
|
||||
= link_to 'Next Bike', edit_bike_path(@next_bike)
|
||||
- else
|
||||
= link_to 'New Bike', new_bike_path
|
||||
|
|
||||
= link_to 'Back', bikes_path
|
||||
= link_to 'All Bikes', bikes_path
|
||||
- if @previous_bike
|
||||
|
|
||||
= link_to 'Previous Bike', edit_bike_path(@previous_bike)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
.container
|
||||
%h1 New bike
|
||||
= render 'new_form'
|
||||
= link_to 'Back', bikes_path
|
||||
= link_to 'All Bikes', bikes_path
|
||||
|
|
||||
= link_to 'Previous Bike', edit_bike_path(@previous_bike)
|
||||
|
||||
Reference in New Issue
Block a user