fixed errors. Design and delete none yet

parent f5c88855
class CarLogsController < ApplicationController
def index
@car_logs = Car_Log.all
@car_logs = CarLog.all
render "car_logs/index.html.erb"
end
......@@ -10,7 +10,7 @@ class CarLogsController < ApplicationController
end
def create
car_log = Car_Log.new
car_log = CarLog.new
car_log.plate_number = params[:plate_number]
car_log.time_in = params[:time_in]
car_log.time_out = params[:time_out]
......
......@@ -7,7 +7,7 @@
<label>Time Out</label>
<input type="text" name="time_out">
<label>Color</label>
<select>
<select name ="color">
<option value ="red">red</option>
<option value="white">white</option>
<option value="blue">blue</option>
......@@ -19,7 +19,7 @@
</select>
<label>Brand</label>
<select>
<select name="brand">
<option value="Honda">Honda</option>
<option value="Toyota">Toyota</option>
<option value="Ford">Ford</option>
......
......@@ -2,7 +2,7 @@
<ul>
<% @car_logs.each do |car_log| %>
<li> <%= "#{car_log.plate_number} #{car_log.time_in} - #{car_log.time_out} #{car_log.color} #{car_log.brand}" %>
<li> <%= "Plate Number: #{car_log.plate_number} Time In: #{car_log.time_in} - Time Out: #{car_log.time_out} Color: #{car_log.color} Brand: #{car_log.brand}" %>
</li>
<%end%>
</ul>
......
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