Ruby ternary operator in erb? Ruby ternary operator in erb? ruby ruby

Ruby ternary operator in erb?


<span style="color:<%= manuscript.uploaded_to_s3? ? 'green' : 'red' %>">

I would advocate a CSS class rather than style attribute 8P:

<span class="<%= manuscript.uploaded_to_s3? ? 'green' : 'red' %>">