How an I make the code below only show "no new messages" once rather
than multiple times when there are multiple tickets?
%tbody
- @users_tickets.each do |t|
- unless t.ticket_replies.empty?
%tr
%td= t.business.name
%td= link_to "#{t.contact.title}"+"("+
"#{t.ticket_replies.count}"+")", inbox_path(t)
%td
= h
distance_of_time_in_words_to_now(t.created_at,include_seconds true)
ago
- else
%b No new messages.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/87a1b99e1d3fec07cbcd038132a6f742%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.