<% @domain.records.each do |record| %> <% if can_edit?(record) %> <% else %> <% end %>
Records Controls
<%= record.name %> IN <%= record.type %> <%= record.supports_prio? ? record.prio : '' %> <%= record.content %> <% if record.disabled? %> <%= link_to 'Enable', enable_domain_record_path(@domain, record), method: :put %> <% else %> <%= link_to 'Disable', disable_domain_record_path(@domain, record), method: :put %> <% end %> <%= link_to 'Edit', edit_domain_record_path(@domain, record) if can_edit?(record) %> <%= link_to 'Remove', [@domain, record], method: :delete, data: { confirm: 'Are you sure?' } %> <% end %>

<%= link_to 'New Record', new_domain_record_path(@domain) %>