mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:29:52 +01:00
now actually adding the asked question to the inbox
This commit is contained in:
parent
17db50623a
commit
f8c81f679d
1 changed files with 3 additions and 3 deletions
|
@ -4,10 +4,10 @@ class Ajax::QuestionController < ApplicationController
|
|||
params.require :anonymousQuestion
|
||||
params.require :rcpt
|
||||
|
||||
question = Question.create!(content: params[:question],
|
||||
author_is_anonymous: params[:anonymousQuestion])
|
||||
|
||||
|
||||
Question.create(content: params[:question],
|
||||
author_is_anonymous: params[:anonymousQuestion])
|
||||
Inbox.create!(user_id: params[:rcpt], question_id: question.id, new: true)
|
||||
|
||||
@status = :okay
|
||||
@message = "Question asked successfully."
|
||||
|
|
Loading…
Reference in a new issue