Commit aef81999 authored by royce-matthew's avatar royce-matthew

Bugfix Time Out displaying created at solved

parent f381f621
......@@ -12,8 +12,8 @@ class CarLogsController < ApplicationController
x.plate_number = params[:plate_number]
x.color = params[:color]
x.brand = params[:brand]
x.time_in = "#{params[:date_in]} #{params[:time_in]}"
x.time_out = "#{params[:date_out]} #{params[:time_out]}"
x.time_in = "#{params[:dates_in]} #{params[:times_in]}"
x.time_out = "#{params[:dates_out]} #{params[:times_out]}"
x.save
redirect_to "/carlogs"
end
......
......@@ -6,12 +6,12 @@
<input class="platenumber" placeholder="plate number" name="plate_number">
<br>
<label>Time In</label>
<input type="date" name="date_in">
<input type="time" name="time_in">
<input type="date" name="dates_in">
<input type="time" name="times_in">
<br>
<label>Time out</label>
<input type="date" name="date_out">
<input type="time" name="time_out">
<input type="date" name="dates_out">
<input type="time" name="times_out">
<br>
<div class="select">
......
......@@ -28,7 +28,7 @@
<label>Created</label> <%=car.created_at=%>
<br>
<label>Time In</label><%=car.time_in=%>
<label>Time Out</label><%=car.created_at=%>
<label>Time Out</label><%=car.time_out=%>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment