now incrementing asked_count

This commit is contained in:
nilsding 2014-11-11 07:18:34 +01:00
parent a7f37fb31c
commit 0226cff3e4
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,10 @@ class Ajax::QuestionController < ApplicationController
author_is_anonymous: params[:anonymousQuestion],
user: current_user)
unless current_user.nil?
current_user.increment! :asked_count unless params[:anonymousQuestion] == 'true'
end
Inbox.create!(user_id: params[:rcpt], question_id: question.id, new: true)
@status = :okay