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
Rupert Bana
parkinglot
Commits
69a01a7f
Commit
69a01a7f
authored
Jul 05, 2016
by
Czar Emmanuel Mejia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Czar Emmanuel Mejia Rupert Ed D. Bana
parent
502e3121
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
car_logs_controller.rb
app/controllers/car_logs_controller.rb
+3
-1
new_carlog.html.erb
app/views/car_logs/new_carlog.html.erb
+5
-0
No files found.
app/controllers/car_logs_controller.rb
View file @
69a01a7f
...
@@ -11,12 +11,14 @@ class CarLogsController < ApplicationController
...
@@ -11,12 +11,14 @@ class CarLogsController < ApplicationController
plate_number
=
params
[
:plate_number
]
plate_number
=
params
[
:plate_number
]
brand
=
params
[
:brand
]
brand
=
params
[
:brand
]
slot_number
=
params
[
:slot_number
]
slot_number
=
params
[
:slot_number
]
is_taken
=
params
[
:is_taken
]
if
!
plate_number
.
empty?
&&
!
brand
.
empty?
&&
!
slot_number
.
empty?
if
!
plate_number
.
empty?
&&
!
brand
.
empty?
&&
!
slot_number
.
empty?
&&!
is_taken
.
empty?
newcarlog
=
CarLog
.
new
newcarlog
=
CarLog
.
new
newcarlog
.
plate_number
=
plate_number
newcarlog
.
plate_number
=
plate_number
newcarlog
.
brand
=
brand
newcarlog
.
brand
=
brand
newcarlog
.
slot_number
=
slot_number
newcarlog
.
slot_number
=
slot_number
newcarlog
.
is_taken
=
is_taken
newcarlog
.
save
newcarlog
.
save
redirect_to
'/car_logs'
redirect_to
'/car_logs'
...
...
app/views/car_logs/new_carlog.html.erb
View file @
69a01a7f
...
@@ -56,6 +56,11 @@
...
@@ -56,6 +56,11 @@
<label
for=
"slot_number"
class=
"sr-only"
>
Slot Number
</label>
<label
for=
"slot_number"
class=
"sr-only"
>
Slot Number
</label>
<input
type=
"text"
name=
"slot_number"
id=
"slot_number"
class=
"form-control"
placeholder=
"Slot Number"
>
<input
type=
"text"
name=
"slot_number"
id=
"slot_number"
class=
"form-control"
placeholder=
"Slot Number"
>
<!-- IS TAKEN -->
<label
for=
"is_taken"
class=
"sr-only"
>
Is Taken
</label>
<p>
Is Taken?
</p>
<input
type=
"radio"
name=
"is_taken"
value=
true
checked
>
Yes
<br>
<input
type=
"radio"
name=
"is_taken"
value=
false
>
No
<!--SUBMIT-->
<!--SUBMIT-->
<input
class=
"btn btn-lg btn-info btn-block"
type=
"submit"
value=
"Add"
></input>
<input
class=
"btn btn-lg btn-info btn-block"
type=
"submit"
value=
"Add"
></input>
<%
end
%>
<%
end
%>
...
...
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