fix admin/candidate[s] naming

This commit is contained in:
Mark Moser
2016-09-22 14:21:34 -05:00
parent 0a9bf96e24
commit aeef75bf8b
5 changed files with 8 additions and 8 deletions

View File

@ -19,7 +19,7 @@ module Admin
if @candidate.persisted?
send_notifications @candidate
redirect_to admin_candidate_path,
redirect_to admin_candidates_path,
flash: { success: "Sucessfully created candidate #{@candidate.name}" }
else
flash[:error] = "Failed to save candidate."
@ -38,7 +38,7 @@ module Admin
@candidate.update(candidate_params)
if @candidate.save
redirect_to admin_candidate_path, flash: { success: "#{@candidate.name} updated!" }
redirect_to admin_candidates_path, flash: { success: "#{@candidate.name} updated!" }
else
flash[:error] = "Failed to save candidate."
render :edit