mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-19 14:16:06 +01:00
16 lines
377 B
Ruby
16 lines
377 B
Ruby
class Ajax::QuestionController < ApplicationController
|
|
def create
|
|
params.require :question
|
|
params.require :anonymousQuestion
|
|
params.require :rcpt
|
|
|
|
|
|
|
|
Question.create(content: params[:question],
|
|
author_is_anonymous: params[:anonymousQuestion])
|
|
|
|
@status = :okay
|
|
@message = "Question asked successfully."
|
|
@success = true
|
|
end
|
|
end
|