Hello Forest,
I added a Smart Action to my Rails app. However, even if the code is running just fine, it displays the following error in the dashboard:
Unexpected error with Generate Audio Url action.
Here is my code:
def generate_audio_url
quiz_question_id = ForestLiana::ResourcesGetter.get_ids_from_request(params).first
quiz_question = QuizQuestion.find(quiz_question_id)
if quiz_question.present?
if quiz_question.question_type == "dictation"
DicteesWorker::CreateAudioSampleWorker.perform_async(nil, quiz_question.id)
end
end
render json: { success: 'Nous créons le fichier audio…' }
end
I guess that’s something related to render json
? What should I render so everything looks fine in the Forest Admin panel?
Thanks.