set user_type correct for comments

This commit is contained in:
Ralf Teusner
2015-04-27 17:59:28 +02:00
parent 725fd00256
commit 0447b076c6
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ class CommentsController < ApplicationController
# POST /comments
# POST /comments.json
def create
@comment = Comment.new(comment_params.merge(user_type: 'InternalUser'))
@comment = Comment.new(comment_params.merge(user_type: current_user.class.name))
respond_to do |format|
if @comment.save