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+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
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.

Reply via email to