lib/rubocop/cop/rails/redundant_allow_nil.rb in rubocop-rails-2.3.2 vs lib/rubocop/cop/rails/redundant_allow_nil.rb in rubocop-rails-2.4.0

- old
+ new

@@ -34,10 +34,10 @@ MSG_ALLOW_NIL_FALSE = '`allow_nil: false` is redundant when `allow_blank` is true.' def on_send(node) - return unless node.method_name == :validates + return unless node.method?(:validates) allow_nil, allow_blank = find_allow_nil_and_allow_blank(node) return unless allow_nil && allow_blank allow_nil_val = allow_nil.children.last