- def lessinfo_candidate
- @show_details = false
- @candidate = Candidate.find( params[:id] )
- render :partial => 'candidate_line'
- end
-
- def moreinfo_candidate
- @show_details = true
- @candidate = Candidate.find( params[:id] )
- render :partial => 'candidate_line'
- end
-
- def edit_candidate
- @candidate = Candidate.find( params[:id] )
- @election = @candidate.election
- end
-
- def update_candidate
- @candidate = Candidate.find(params[:id])
-
- if @candidate.update_attributes(params[:candidate])
- flash[:notice] = 'Candidate information was successfully updated.'
- redirect_to :action => 'edit_candidates', :id => @candidate.election
- else
- render :action => 'edit_candidates'
- end
- end
-