Commit a2e9f881 authored by Jello Beasca's avatar Jello Beasca

Hirap nito pre

parents 17394e35 b43d82f2
...@@ -40,4 +40,5 @@ class CarLogsController < ApplicationController ...@@ -40,4 +40,5 @@ class CarLogsController < ApplicationController
# def carlog_params # def carlog_params
# params.require(:carlog).permit! # params.require(:carlog).permit!
# end # end
end end
class CarLog < ActiveRecord::Base class CarLog < ActiveRecord::Base
end end
<h1>Add Car Log</h1>
<%= form_for(@carlog) do |u| %>
<p>
<%= u.label :plate_number %>
<%= u.number_field :plate_number %>
</p>
<p>
<select name = "brand">
<option value="A">Toyota</option>
<option value="B">Honda</option>
<option value="C">Ford</option>
</p>
<p>
<%= u.label :slot_number %>
<%= u.text_field :slot_number %>
</p>
<p>
<%= u.label :is_taken %>
<%= u.text_field :is_taken %>
</p>
<p>
<%= u.label :created_at %>
<%= u.text_field :created_at %>
</p>
<p>
<%= u.label :updated_at %>
<%= u.text_field :updated_at %>
</p>
<%= u.submit %>
<% end %>
<%= link_to 'Back', pages_path %>
\ No newline at end of file
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
<th>Slot number</th> <th>Slot number</th>
<th>Taken</th> <th>Taken</th>
<th>Created at</th> <th>Created at</th>
<th>Updated at</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
......
Rails.application.routes.draw do Rails.application.routes.draw do
root 'pages#index' root 'pages#index'
get '/car_logs', to: 'car_logs#index', as: :car_logs get '/car_logs', to: 'car_logs#index', as: :car_logs
get '/car_logs/add', to: 'car_logs#add', as: :add_car_logs get '/car_logs/add', to: 'car_logs#add', as: :add_car_logs
......
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