Forum: Ruby on Rails testing for empty columns

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Josh K. (Guest)
on 2006-05-08 22:46
i almost feel dumb for even asking this one, but i can't seem to figure
it out.

i just need to test for an empty variable. i've tried:

<% if object.value
end %>

but it always evaluates to true, even if the variable is empty.
Josh K. (Guest)
on 2006-05-08 23:10
figured it out. nvm.

i used "object.value.nil?"
This topic is locked and can not be replied to.