krunal shah
krunal shah

Reputation: 16339

Any suggestion to DRY this?

<col class="psap-msisdn-col"></col>
<col class="from-col"></col>
<col class="psap-name-col"></col>
<col class="rh-sip-uri-col"></col>
<col class="psap-message-col"></col>
<col class="dlg-time-col"></col>
<col></col>

Any better ways ?

Upvotes: 0

Views: 55

Answers (1)

Staelen
Staelen

Reputation: 7841

do you mean something like this?

<% ["psap-msisdn-col", "from-col", ... etc].each do |klass| %>
  <col class="<%=klass%>"></col>
<% end %>
<col></col>

Upvotes: 3

Related Questions