now actually adding the asked question to the inbox

This commit is contained in:
nilsding 2014-11-10 23:46:38 +01:00
parent 17db50623a
commit f8c81f679d

View file

@ -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."