now incrementing asked_count
This commit is contained in:
parent
a7f37fb31c
commit
0226cff3e4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue