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
1eaf9d2d
Commit
1eaf9d2d
authored
Jul 18, 2016
by
Kristoff Sison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed wording inconsistencies
parent
8ef422dd
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
47 deletions
+27
-47
Gemfile.lock
Election/Gemfile.lock
+1
-1
candidates_controller.rb
Election/app/controllers/admin/candidates_controller.rb
+25
-25
candidates_controller.rb
Election/app/controllers/candidates_controller.rb
+1
-1
_form.html.erb
Election/app/views/admin/_form.html.erb
+0
-5
edit.html.erb
Election/app/views/admin/edit.html.erb
+0
-3
new.html.erb
Election/app/views/admin/new.html.erb
+0
-5
show.html.erb
Election/app/views/admin/show.html.erb
+0
-7
No files found.
Election/Gemfile.lock
View file @
1eaf9d2d
...
@@ -178,4 +178,4 @@ DEPENDENCIES
...
@@ -178,4 +178,4 @@ DEPENDENCIES
web-console (~> 2.0)
web-console (~> 2.0)
BUNDLED WITH
BUNDLED WITH
1.1
0.4
1.1
2.5
Election/app/controllers/admin/candidates_controller.rb
View file @
1eaf9d2d
...
@@ -8,13 +8,13 @@ class CandidatesController < ApplicationController
...
@@ -8,13 +8,13 @@ class CandidatesController < ApplicationController
render
"admin/candidates/index.html.erb"
render
"admin/candidates/index.html.erb"
end
end
def
new
def
new
@
position
=
Candidate
.
new
@
candidate
=
Candidate
.
new
render
"admin/candidates/new.html.erb"
render
"admin/candidates/new.html.erb"
end
end
def
create
def
create
@candidate
=
Candidate
.
new
(
candidate_params
())
@candidate
=
Candidate
.
new
(
candidate_params
())
if
@
position
.
save
if
@
candidate
.
save
redirect_to
admin_candidate_path
(
@candidate
.
id
)
redirect_to
admin_candidate_path
(
@candidate
.
id
)
else
else
render
"admin/candidates/new.html.erb"
render
"admin/candidates/new.html.erb"
...
...
Election/app/controllers/candidates_controller.rb
View file @
1eaf9d2d
class
CandidatesController
<
ApplicationController
class
CandidatesController
<
ApplicationController
def
index
def
index
@
positions
=
Position
.
all
@
candidates
=
Candidates
.
all
end
end
end
end
\ No newline at end of file
Election/app/views/admin/_form.html.erb
deleted
100644 → 0
View file @
8ef422dd
<%=
simple_form_for
([
:admin
,
@position
])
do
|
f
|
%>
<%=
f
.
input
:name
%>
<%=
f
.
submit
%>
<%
end
%>
\ No newline at end of file
Election/app/views/admin/edit.html.erb
deleted
100644 → 0
View file @
8ef422dd
<h1>
Admin Edit Position
</h1>
<%=
render
partial:
"form"
%>
<%=
link_to
"Back to Positions"
,
admin_positions_path
%>
\ No newline at end of file
Election/app/views/admin/new.html.erb
deleted
100644 → 0
View file @
8ef422dd
<h1>
Admin New Position
</h1>
<%=
render
partial:
"form"
%>
<%=
link_to
"Back to Positions"
,
admin_positions_path
%>
Election/app/views/admin/show.html.erb
deleted
100644 → 0
View file @
8ef422dd
<h1>
Position:
<%=
@position
.
name
%>
</h1>
<h2>
Candidates:
</h2>
<ul>
<%
@candidates
.
each
do
|
c
|
%>
<li>
<%=
link_to
"
#{
c
.
first_name
}
"
+
"
#{
c
.
last_name
}
"
,
admin_candidate_path
(
c
.
id
)
%>
</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