fix admin/candidate[s] naming
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user