From b3ffdf49169aaa1becb221c5ebd02ad02a6e9303 Mon Sep 17 00:00:00 2001 From: Abdelhalim Date: Mon, 5 Mar 2018 15:20:02 -0500 Subject: [PATCH] fixied table issue --- app/controllers/rentals_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/rentals_controller.rb b/app/controllers/rentals_controller.rb index bfc70eb..ff43db2 100644 --- a/app/controllers/rentals_controller.rb +++ b/app/controllers/rentals_controller.rb @@ -30,8 +30,8 @@ def show @rentals=User.find(session[:user_id]).rental.where("drop_date != 'nill' ") @rentals.each do |r| @vehicle=r.vehicle - @local_start=@vehicle.local - @local_end=Local.find(r.local_drop) + @local_start=r.local + @local_end=Local.find_by_id(r.local_drop.to_i) @history.push({rental:r,vehicle:@vehicle,local_start:@local_start,local_end:@local_end}) end