Louis | user can mark bikes as picked up from the available freecyclery bikes page

This commit is contained in:
Loos
2014-12-22 13:50:21 -06:00
parent d0a91882e3
commit 157712ac67
5 changed files with 23 additions and 8 deletions
+6
View File
@@ -61,6 +61,12 @@ class BikesController < ApplicationController
end
end
def mark_picked_up
@bike = Bike.find(params[:id])
@bike.mark_picked_up
flash[:notice] = @bike.name + ' was marked as picked up'
redirect_to action: "ready_for_pickup", controller: "freecyclery"
end
private
def set_bike