On Sun, Feb 22, 2009 at 3:26 AM, Adam Akhtar
<[email protected]> wrote:

> Whilst looping though an array of model objects in my view I want to be
> able to show or hide a div that contains the message "Your list is
> empty".

> <% if items.empty?>
> #the following is not the correct way
> $('no-items-msg').show

Why would you do this with JS?? Just put the message here. Then
users with or without JS enabled (including spiders and web service
clients) will get the intended view.

> <% else >

FWIW,
-- 
Hassan Schroeder ------------------------ [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to