mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-31 12:49:08 +01:00
now incrementing asked_count
This commit is contained in:
parent
a7f37fb31c
commit
0226cff3e4
1 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,10 @@ class Ajax::QuestionController < ApplicationController
|
||||||
author_is_anonymous: params[:anonymousQuestion],
|
author_is_anonymous: params[:anonymousQuestion],
|
||||||
user: current_user)
|
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)
|
Inbox.create!(user_id: params[:rcpt], question_id: question.id, new: true)
|
||||||
|
|
||||||
@status = :okay
|
@status = :okay
|
||||||
|
|
Loading…
Reference in a new issue