You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
605 B
16 lines
605 B
# frozen_string_literal: true
|
|
|
|
# This file was generated by QuestionsCrafter
|
|
# Generated at: <%= Time.now.strftime("%Y-%m-%d %H:%M:%S") %>
|
|
class <%= class_name.camelize %>Controller < ApplicationController
|
|
include QuestionsCrafter::ControllerHelpers
|
|
handles_questions <%= class_name %>Questions, on_success: :create_handler
|
|
|
|
def create_handler(questions_object)
|
|
# Bussiness layer logic that can now access the fields defined in the SurveyQuestions instance
|
|
# if questions_object.age > 40
|
|
|
|
# If no redirect is detected it will just display the answers
|
|
redirect_to root_path
|
|
end
|
|
end
|
|
|