lib/rubocop/cop/rails/blank.rb in rubocop-rails-2.9.1 vs lib/rubocop/cop/rails/blank.rb in rubocop-rails-2.10.0
- old
+ new
@@ -4,9 +4,13 @@
module Cop
module Rails
# This cop checks for code that can be written with simpler conditionals
# using `Object#blank?` defined by Active Support.
#
+ # This cop is marked as unsafe auto-correction, because `' '.empty?` returns false,
+ # but `' '.blank?` returns true. Therefore, auto-correction is not compatible
+ # if the receiver is a non-empty blank string, tab, or newline meta characters.
+ #
# Interaction with `Style/UnlessElse`:
# The configuration of `NotPresent` will not produce an offense in the
# context of `unless else` if `Style/UnlessElse` is inabled. This is
# to prevent interference between the auto-correction of the two cops.
#