Commit 71cf9e2b authored by Bianca Tarun's avatar Bianca Tarun

edited candidatemodel and pages index html

parent 4b166785
...@@ -2,7 +2,6 @@ class Candidate < ActiveRecord::Base ...@@ -2,7 +2,6 @@ class Candidate < ActiveRecord::Base
validates :first_name, presence: true validates :first_name, presence: true
validates :last_name, presence: true validates :last_name, presence: true
validates :slogan, uniqueness: true, presence: true validates :slogan, uniqueness: true, presence: true
validates :party_list, presence: true
validates :position, presence: true validates :position, presence: true
belongs_to :position belongs_to :position
belongs_to :party_list belongs_to :party_list
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<%= f.input :first_name %> <%= f.input :first_name %>
<%= f.input :last_name %> <%= f.input :last_name %>
<%= f.input :nickname %> <%= 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.association :position, as: :select, include_blank: true, required: true %>
<%= f.input :slogan %> <%= f.input :slogan %>
<%= f.submit %> <%= f.submit %>
......
...@@ -6,6 +6,7 @@ ...@@ -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 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 "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", 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 "About", pages_about_path %></button>
<button type="button" class="btn btn-default"><%= link_to "User Profile", votes_user_profile_path %></button> <button type="button" class="btn btn-default"><%= link_to "User Profile", votes_user_profile_path %></button>
<% else %> <% else %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment