Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source
Show
Ignore:
Timestamp:
04/05/08 03:52:58 (2 years ago)
Author:
pratik
Message:

Improve documentation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/lib/active_support/core_ext/blank.rb

    r9093 r9226  
    11class Object 
    22  # An object is blank if it's false, empty, or a whitespace string. 
    3   # For example, "", "   ", nil, [], and {} are blank. 
     3  # For example, "", "   ", +nil+, [], and {} are blank. 
    44  # 
    55  # This simplifies 
     6  # 
    67  #   if !address.nil? && !address.empty? 
     8  # 
    79  # to 
     10  # 
    811  #   if !address.blank? 
    912  def blank?