I have a bit of code in RhoMobile that shows results of a search. I want to display a message if no results are found but as a Ruby n00b I'm not getting the message I want output.
<ul data-role="listview">
<% @employees.each do |employee| %>
<li>
<a href="<%= url_for :action => :show, :id => employee.object %>">
<%= employee.name %>
</a>
</li>
<% end %>
<% "<li>No results found</li>" if @employees.empty? %>
</ul>
How to fix this?
– Martlark Apr 17 '12 at 04:30
.
– Martlark Apr 17 '12 at 04:35