<%- if @campaigns.empty? %>
<tr>
  <td colspan="5">
    <%= t(".no_campaigns") %>
  </td>
</tr>
<%- end %>

<% @campaigns.each do |campaign| %>
  <tr>
    <td>
      <%= link_to_edit campaign.title, campaign %>
      <div class="action">
        <%= button_to_edit_campaign campaign %>
        <%= button_to_delete_campaign campaign %>
      </div>
    </td>
    <td><%= campaign.active?%></td>
    <td><%= l(campaign.created_at) %></td>
  </tr>
<% end %>

<%- if @campaigns.empty? %>
<tr>
  <td colspan="5">
    <%= t(".no_campaigns") %>
  </td>
</tr>
<%- end %>

<% @campaigns.each do |campaign| %>
  <tr>
    <td>
      <%= link_to campaign.title, edit_admin_campaign_path(campaign), class: 'edit' %>
      <div class="action">
        <%= button_to_edit_campaign campaign %>
        <%= button_to_delete_campaign campaign %>
      </div>
    </td>
    <td><%= campaign.active?%></td>
    <td><%= l(campaign.created_at) %></td>
  </tr>
<% end %>

Refactor link_to call to fix failing campaign spec
Refactor link_to call to fix failing campaign spec
