Commit 47c07067 authored by Bianca Tarun's avatar Bianca Tarun

edited car_logs_controller.rb

parent 59dbbc58
......@@ -159,3 +159,6 @@ DEPENDENCIES
tzinfo-data
uglifier (>= 1.3.0)
web-console (~> 2.0)
BUNDLED WITH
1.10.4
class CarLogController < ApplicationController
class CarLogsController < ApplicationController
def index
@car_logs = Carlog.all
......
<h1>Add Car</h1>
<%= form_tag("/car_log/add", method: "post") do %>
<%= form_tag("/car_logs/add", method: "post") do %>
<label>Plate Number:</label>
<input type= "text" name= "plate_number"/>
<hr>
......@@ -37,4 +37,4 @@
<input type= "submit" value= "Add Car"/>
<% end %>
<hr>
<a href= "/car_log">View All Cars</a>
\ No newline at end of file
<a href= "/car_logs">View All Cars</a>
\ No newline at end of file
......@@ -45,6 +45,6 @@
</tbody>
</table>
<hr>
<a href= "/car_log/add">Add New Sport</a>
<a href= "/car_logs/add">Add New Sport</a>
<hr>
<a href= "/">Go back to Homepage</a>
\ No newline at end of file
Rails.application.routes.draw do
root to: "pages#index"
get"/car_log", to: "car_log#index"
get"/car_log/add", to: "car_log#add"
get"/car_log/delete", to: "car_log#delete"
post"/car_log/add", to: "car_log#add"
post"/car_log/delete", to: "car_log#delete"
get"/car_logs", to: "car_logs#index"
get"/car_logs/add", to: "car_logs#add"
get"/car_logs/delete", to: "car_logs#delete"
post"/car_logs/add", to: "car_logs#add"
post"/car_logs/delete", to: "car_logs#delete"
end
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