<%% if @<%= instances_name %>.any? %> // Fill the right box with first <%= instance_name %> details in the list $('#div_<%= instance_name %>_details').html("<%%= escape_javascript(render(:partial=>'show')) %>"); // Rendering the item list $('#div_<%= instance_name %>_collections').html("<%%= escape_javascript(render(:partial=>"index")) %>"); <%% else %> var noResultsText = "
No <%= instances_name %> found.
"; $('#div_<%= instance_name %>_details').html(noResultsText); $('#div_<%= instance_name %>_collections').html(noResultsText); <%% end %>