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?
on 2006-03-13 10:17
on 2006-03-13 13:18
Am Montag, den 13.03.2006, 11:15 +0200 schrieb bmgz: > (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
on 2006-03-13 13:57
Norman Timmler wrote: > No, that's it. Just a simple condition. How would you simplify this? I guess i am just a bit paranoid of doing things the wrong way and adopting bad habits ;-)