add the required integer column and the increment statement when featured

This commit is contained in:
Ralf Teusner
2018-02-02 14:38:28 +01:00
parent 8da9fa1971
commit da23cc22aa
3 changed files with 10 additions and 1 deletions

View File

@@ -416,6 +416,9 @@ class ExercisesController < ApplicationController
flash[:notice] = I18n.t('exercises.submit.full_score_redirect_to_rfc')
flash.keep(:notice)
# increase counter 'times_featured' in rfc
rfc.increment!(:times_featured)
respond_to do |format|
format.html {redirect_to(rfc)}
format.json {render(json: {redirect: url_for(rfc)})}