save progress. added user feedback view and stuff

This commit is contained in:
Thomas Hille
2017-04-11 15:00:35 +02:00
parent 341cd3a003
commit 73c3b902a3
7 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,42 @@
class UserExerciseFeedbackController < ApplicationController
include CommonBehavior
def authorize!
authorize(@uef)
end
private :authorize!
def create
@tag = Tag.new(tag_params)
authorize!
create_and_respond(object: @tag)
end
def destroy
destroy_and_respond(object: @tag)
end
def edit
end
def uef_params
params[:tag].permit(:feedback_text, :difficulty)
end
private :uef_params
def new
@uef = UserExerciseFeedback.new
authorize!
end
def show
end
def update
update_and_respond(object: @UserExerciseFeedback, params: uef_params)
end
def to_s
name
end
end