blank?

An article by Gaspard Bucher

return true if the receiver is empty or nil

  1. action
  2. ajax
  3. API
  4. classes
  5. common attributes
  6. conditions
    1. blank?
    2. case
    3. ClassCondition
    4. else
    5. if
    6. is_ancestor?
    7. selenium
    8. when
  7. context
  8. dates
  9. display
  10. forms
  11. i18n
  12. meta
  13. SQLiss
  14. urls

return true if the receiver is empty or nil

see zena 1.0

This method works on any object:

Testing if a string is empty (or nil):

<r:if eval='title.blank?'>...</r:if>

In fact the example above is the reverse of
<r:if attr='title'>..</r:if>.

Testing if a relation does not exist:

<r:if eval='icon.blank?'>...</r:if>

Usually, all these usages are better implemented with if and else.