Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #14635 from eileencodes/remove-check-for-present

remove check for present? from delete_all method
  • Loading branch information...
commit 9575c820974b862a19dca1fcff54300b166e9a9c 2 parents e1404ec + 2512bd7
@rafaelfranca rafaelfranca authored
View
4 activerecord/lib/active_record/associations/collection_association.rb
@@ -182,11 +182,11 @@ def transaction(*args)
#
# See delete for more info.
def delete_all(dependent = nil)
- if dependent.present? && ![:nullify, :delete_all].include?(dependent)
+ if dependent && ![:nullify, :delete_all].include?(dependent)
raise ArgumentError, "Valid values are :nullify or :delete_all"
end
- dependent = if dependent.present?
+ dependent = if dependent
dependent
elsif options[:dependent] == :destroy
:delete_all
Please sign in to comment.
Something went wrong with that request. Please try again.