We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb128f4 commit 09571bbCopy full SHA for 09571bb
app/views/quizzes/_result.html.erb
@@ -8,7 +8,7 @@
8
<% sorted_traits = ['warrior','athlete','artist'].sort_by { |p| -percentages[p].to_f } %>
9
<% sorted_traits.each_with_index do |p, index| %>
10
<%= link_to quiz_result_path(trait: p), data: { turbo_frame: "trait_description" },
11
- class: "block cursor-pointer hover:bg-gray-50 transition-colors duration-200 p-3 rounded border #{'bg-blue-50 border-blue-300' if index == 0}" do %>
+ class: "block cursor-pointer hover:bg-gray-50 transition-colors duration-200 p-3 rounded border #{'bg-blue-50 border-blue-300' if @current_trait == p}" do %>
12
<div class="flex justify-between items-center">
13
<div class="font-semibold capitalize flex items-center gap-2">
14
<%= p %>
0 commit comments