now actually adding the asked question to the inbox
This commit is contained in:
parent
17db50623a
commit
f8c81f679d
|
@ -4,11 +4,11 @@ class Ajax::QuestionController < ApplicationController
|
||||||
params.require :anonymousQuestion
|
params.require :anonymousQuestion
|
||||||
params.require :rcpt
|
params.require :rcpt
|
||||||
|
|
||||||
|
question = Question.create!(content: params[:question],
|
||||||
|
|
||||||
Question.create(content: params[:question],
|
|
||||||
author_is_anonymous: params[:anonymousQuestion])
|
author_is_anonymous: params[:anonymousQuestion])
|
||||||
|
|
||||||
|
Inbox.create!(user_id: params[:rcpt], question_id: question.id, new: true)
|
||||||
|
|
||||||
@status = :okay
|
@status = :okay
|
||||||
@message = "Question asked successfully."
|
@message = "Question asked successfully."
|
||||||
@success = true
|
@success = true
|
||||||
|
|
Loading…
Reference in New Issue