Am Montag, den 13.03.2006, 11:15 +0200 schrieb bmgz:> I want to have some sort of message to be shown
> when I have an empty object.
>
> For example when I click on a properties'' gallery
> and their are no photos, I want a simple "gallery is empty"
>
> I have managed to do this in the view by doing a crude
> code block:
>
> <% unless @object.empty? %>
> (show gallery)
> <% else %>
> gallery is empty
> <% end %>
>
> I am sure rails has a better way to solve this,
> can anybody help me?
No, that''s it. Just a simple condition. How would you simplify this?
--
Norman Timmler
http://blog.inlet-media.de