Allow user select bike worked when adding time

This commit is contained in:
Jason Denney
2014-04-19 16:48:10 -04:00
parent 3e56f2eb19
commit b30203b750
2 changed files with 6 additions and 3 deletions
+5 -1
View File
@@ -1,7 +1,11 @@
class TimeEntriesController < AuthenticatedController
def new
@bikes = Bike.all.map{ |b| [b.to_s , b.id] }
if bike = current_user.bike
@bikes.unshift( [bike.to_s, bike.id] )
end
@bikes.unshift( ["Non-bike work", -1] )
end
def index