Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MIS21FinalsElection
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
Dean Krisitan Bardeloza
MIS21FinalsElection
Commits
ca6be502
Commit
ca6be502
authored
Jul 19, 2016
by
Alfonso Gabriel R. Arvisu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a line of code to candidates_controller in order for an admin to edit the candidate.
parent
fc99cc9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
candidates_controller.rb
Election/app/controllers/admin/candidates_controller.rb
+4
-0
edit.html.erb
Election/app/views/admin/candidates/edit.html.erb
+1
-1
No files found.
Election/app/controllers/admin/candidates_controller.rb
View file @
ca6be502
...
@@ -20,6 +20,10 @@ class CandidatesController < ApplicationController
...
@@ -20,6 +20,10 @@ class CandidatesController < ApplicationController
render
"admin/candidates/new.html.erb"
render
"admin/candidates/new.html.erb"
end
end
end
end
def
edit
@candidate
=
Candidate
.
find
(
params
[
:id
])
render
"admin/candidates/edit.html.erb"
end
def
update
def
update
@candidate
=
Candidate
.
find
(
params
[
:id
])
@candidate
=
Candidate
.
find
(
params
[
:id
])
...
...
Election/app/views/admin/candidates/edit.html.erb
View file @
ca6be502
<h1>
Admin
New
Candidate
</h1>
<h1>
Admin
Edit
Candidate
</h1>
<%=
render
partial:
"form"
%>
<%=
render
partial:
"form"
%>
...
...
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