<% @s2_pmt_transact.each do |s2_pmt_transact| %>
<% if (s2_pmt_transact.key = 7) %>
<tr style="background-color:#EAEAEA">
<% else %>
<tr style="background-color:#FFFFFF">
<% end %>
I would like the cell coloring to be based on value of key as in the code above. But all values of key (7 and above) are printed just fine - but color coding seems to be just #EAEAEA for all of them. How can I enforce conditional coloring?