Retrospring/app/controllers/ajax/question_controller.rb

17 lines
377 B
Ruby
Raw Normal View History

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