Commit 1eaf9d2d authored by Kristoff Sison's avatar Kristoff Sison

fixed wording inconsistencies

parent 8ef422dd
...@@ -178,4 +178,4 @@ DEPENDENCIES ...@@ -178,4 +178,4 @@ DEPENDENCIES
web-console (~> 2.0) web-console (~> 2.0)
BUNDLED WITH BUNDLED WITH
1.10.4 1.12.5
...@@ -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"
......
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
<%= simple_form_for([:admin, @position]) do |f| %>
<%= f.input :name %>
<%= f.submit %>
<% end %>
\ No newline at end of file
<h1>Admin Edit Position</h1>
<%= render partial: "form" %>
<%= link_to "Back to Positions", admin_positions_path %>
\ No newline at end of file
<h1>Admin New Position</h1>
<%= render partial: "form" %>
<%= link_to "Back to Positions", admin_positions_path %>
<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>
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