diff --git a/app/helpers/questions_helper.rb b/app/helpers/questions_helper.rb index 2eaab4ab..3bb34d54 100644 --- a/app/helpers/questions_helper.rb +++ b/app/helpers/questions_helper.rb @@ -1,2 +1,7 @@ module QuestionsHelper + + def format_question(question_text) + question_text.gsub("[Field-MathTeacher][Field-ScienceTeacher][Field-EnglishTeacher][Field-SocialTeacher]", "teacher") + end + end diff --git a/app/views/questions/_question.html.haml b/app/views/questions/_question.html.haml index 44269942..2ab0cf64 100644 --- a/app/views/questions/_question.html.haml +++ b/app/views/questions/_question.html.haml @@ -4,7 +4,7 @@ .col-12.col-md-6.py-3 .question.p-2{id: "question-#{question.id}"} %p.question-text.pt-3.px-2 - = question.text + = format_question(question.text) .row.pt-2 .col-4.indicator-container.centered