fixed response in order to redirect correctly on ajax requests. Fixed policy

This commit is contained in:
Ralf Teusner
2017-04-18 16:51:02 +02:00
parent 51b4f1acbc
commit d053850572
3 changed files with 15 additions and 29 deletions

View File

@ -1,6 +1,6 @@
class UserExerciseFeedback < ActiveRecord::Base
include Creation
belongs_to :user, polymorphic: true
belongs_to :exercise
validates :user_id, uniqueness: { scope: [:exercise_id, :user_type] }