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
71cf9e2b
Commit
71cf9e2b
authored
Jul 22, 2016
by
Bianca Tarun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edited candidatemodel and pages index html
parent
4b166785
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
2 deletions
+2
-2
candidate.rb
Election/app/models/candidate.rb
+0
-1
_form.html.erb
Election/app/views/admin/candidates/_form.html.erb
+1
-1
index.html.erb
Election/app/views/pages/index.html.erb
+1
-0
No files found.
Election/app/models/candidate.rb
View file @
71cf9e2b
...
...
@@ -2,7 +2,6 @@ class Candidate < ActiveRecord::Base
validates
:first_name
,
presence:
true
validates
:last_name
,
presence:
true
validates
:slogan
,
uniqueness:
true
,
presence:
true
validates
:party_list
,
presence:
true
validates
:position
,
presence:
true
belongs_to
:position
belongs_to
:party_list
...
...
Election/app/views/admin/candidates/_form.html.erb
View file @
71cf9e2b
...
...
@@ -3,7 +3,7 @@
<%=
f
.
input
:first_name
%>
<%=
f
.
input
:last_name
%>
<%=
f
.
input
:nickname
%>
<%=
f
.
association
:party_list
,
as: :select
,
include_blank:
true
,
required:
true
%>
<%=
f
.
association
:party_list
,
as: :select
,
include_blank:
true
%>
<%=
f
.
association
:position
,
as: :select
,
include_blank:
true
,
required:
true
%>
<%=
f
.
input
:slogan
%>
<%=
f
.
submit
%>
...
...
Election/app/views/pages/index.html.erb
View file @
71cf9e2b
...
...
@@ -6,6 +6,7 @@
<button
type=
"button"
class=
"btn btn-default"
>
<%=
link_to
"Manage Positions"
,
admin_positions_path
%>
</button>
<button
type=
"button"
class=
"btn btn-default"
>
<%=
link_to
"Manage Party Lists"
,
admin_party_lists_path
%>
</button>
<button
type=
"button"
class=
"btn btn-default"
>
<%=
link_to
"Vote"
,
votes_new_path
%>
</button>
<button
type=
"button"
class=
"btn btn-default"
>
<%=
link_to
"Vote Record"
,
votes_index_path
%>
</button>
<button
type=
"button"
class=
"btn btn-default"
>
<%=
link_to
"About"
,
pages_about_path
%>
</button>
<button
type=
"button"
class=
"btn btn-default"
>
<%=
link_to
"User Profile"
,
votes_user_profile_path
%>
</button>
<%
else
%>
...
...
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