<% @players.each do |player| %>
    <% if rad_win == true %>
    <%  @mywin = "Radiant Win" %>
    <%  puts "1111111" %>
    <% elsif rad_win == false %>
    <%  @mywin = "Radiant Loss" %>
    <%  puts "222222" %>
    <% else %>
    <%   @mywin = "Loss" %>
    <% end %>
<% end %>
In my test.html.erb I have the following code. I can see that rad_win is false,but that code block is not executed. i.e there is no 22222222
You are using ERB, which requires that any text you wanted displayed must be used with <%= %>
As such:
<% @players.each do |player| %>
    <% if rad_win == true %>
    <%  @mywin = "Radiant Win" %>
    <%= "1111111" %>
    <% elsif rad_win == false %>
    <%  @mywin = "Radiant Loss" %>
    <%=  "222222" %>
    <% else %>
    <%   @mywin = "Loss" %>
    <% end %>
<% end %>
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With