Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Datababes
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
George Nicole Balmaceda
Datababes
Commits
4c12cdfe
Commit
4c12cdfe
authored
Jul 05, 2016
by
George Nicole Balmaceda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added delete
parent
e01cb97a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
car_logs_controller.rb
parkinglot/app/controllers/car_logs_controller.rb
+6
-0
routes.rb
parkinglot/config/routes.rb
+1
-1
No files found.
parkinglot/app/controllers/car_logs_controller.rb
View file @
4c12cdfe
...
@@ -17,4 +17,10 @@ class CarLogsController < ApplicationController
...
@@ -17,4 +17,10 @@ class CarLogsController < ApplicationController
x
.
save
x
.
save
redirect_to
"/carlogs"
redirect_to
"/carlogs"
end
end
def
delete
id
=
params
[
:id
]
@car
=
CarLog
.
find
(
id
.
to_i
)
@car
.
destroy
redirect_to
"/carlogs"
end
end
end
\ No newline at end of file
parkinglot/config/routes.rb
View file @
4c12cdfe
...
@@ -4,7 +4,7 @@ Rails.application.routes.draw do
...
@@ -4,7 +4,7 @@ Rails.application.routes.draw do
get
"/group"
,
to:
"pages#group"
get
"/group"
,
to:
"pages#group"
get
"/carlogs/new"
,
to:
"car_logs#form"
get
"/carlogs/new"
,
to:
"car_logs#form"
post
"/carlogs/create"
,
to:
"car_logs#create"
post
"/carlogs/create"
,
to:
"car_logs#create"
get
"carlogs/delete/:id"
,
to:
"car_logs#delete"
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