fixed errors. Design and delete none yet

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