Don't Display The Delete Link Unless No Service Events Exist
Join the DZone community and get the full member experience.Join For Free
// This is the link I'll use when I get to adding the delete methods in the controllers.
<% if @client.service_events.empty? -%> | <%= link_to "delete", :controller => "admin", :action => "destroy_client", :id => @client %><% end -%>
Opinions expressed by DZone contributors are their own.