I have multiple if statements.
<% if offer.merchant == 'webgains' %>
<a href="<%= offer.url %>&clickref=<%= current_user.id %>" target="_blank">
<% else %>
<a href="<%= offer.url %>" target="_blank">
<% end %>
<% if offer.merchant == 'rakuten' %>
<h1>WOOP</h1>
<% else %>
<h1>FAIL</h1>
<% end %>
<% if offer.merchant == 'cj' %>
<a href="<%= offer.url %>?sid=<%= current_user.id %>" target="_blank">
<% else %>
<a href="<%= offer.url %>" target="_blank">
<% end %>
<% if offer.merchant == 'aw' %>
<a href="<%= offer.url %>&clickref=<%= current_user.id %>" target="_blank">
<% else %>
<a href="<%= offer.url %>" target="_blank">
<% end %>
Is there any way to consolidate them to cleaner code as well as making them work smoothly?