aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/blank.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/blank.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/blank.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/blank.rb b/activesupport/lib/active_support/core_ext/blank.rb
index f4def18ae9..dfe33162e8 100644
--- a/activesupport/lib/active_support/core_ext/blank.rb
+++ b/activesupport/lib/active_support/core_ext/blank.rb
@@ -1,10 +1,13 @@
class Object
# An object is blank if it's false, empty, or a whitespace string.
- # For example, "", " ", nil, [], and {} are blank.
+ # For example, "", " ", +nil+, [], and {} are blank.
#
# This simplifies
+ #
# if !address.nil? && !address.empty?
+ #
# to
+ #
# if !address.blank?
def blank?
respond_to?(:empty?) ? empty? : !self