diff options
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/blank.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb index d6f0056ba4..8cef3e87ea 100644 --- a/activesupport/lib/active_support/core_ext/object/blank.rb +++ b/activesupport/lib/active_support/core_ext/object/blank.rb @@ -76,7 +76,12 @@ class Array alias_method :blank?, :empty? end -class Hash #:nodoc: +class Hash + # A hash is blank if it's empty + # For example: + # + # {}.blank? => true + # {:key => 'value'}.blank? => false alias_method :blank?, :empty? end |