Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
parkinglot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MiiikoLang
parkinglot
Commits
327036b6
Commit
327036b6
authored
Jul 05, 2016
by
Francesco Martin Mamaradlo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed errors. Design and delete none yet
parent
f5c88855
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
car_logs_controller.rb
parkinglot/app/controllers/car_logs_controller.rb
+2
-2
add_cars.html.erb
parkinglot/app/views/car_logs/add_cars.html.erb
+2
-2
index.html.erb
parkinglot/app/views/car_logs/index.html.erb
+1
-1
No files found.
parkinglot/app/controllers/car_logs_controller.rb
View file @
327036b6
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
]
...
...
parkinglot/app/views/car_logs/add_cars.html.erb
View file @
327036b6
...
...
@@ -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>
...
...
parkinglot/app/views/car_logs/index.html.erb
View file @
327036b6
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment