aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/autosave_association.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-05-28 17:10:21 +0200
committerGitHub <noreply@github.com>2017-05-28 17:10:21 +0200
commit87eae9ffa65944697fb16dcdf5e2f1b3747b7a9d (patch)
treeb4006e2eb426b33a88547edbf6179af86c59c8d3 /activerecord/lib/active_record/autosave_association.rb
parentb88200f10376a3d73c34a7db0347acc7b06bad39 (diff)
parent0584e21ac03a7abba100a8820aeab8de32facc2d (diff)
downloadrails-87eae9ffa65944697fb16dcdf5e2f1b3747b7a9d.tar.gz
rails-87eae9ffa65944697fb16dcdf5e2f1b3747b7a9d.tar.bz2
rails-87eae9ffa65944697fb16dcdf5e2f1b3747b7a9d.zip
Merge pull request #29074 from kamipo/remove_returning_true_in_internal_callbacks
Remove returning true in internal callbacks
Diffstat (limited to 'activerecord/lib/active_record/autosave_association.rb')
-rw-r--r--activerecord/lib/active_record/autosave_association.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb
index ebe92e7878..829a4f6e86 100644
--- a/activerecord/lib/active_record/autosave_association.rb
+++ b/activerecord/lib/active_record/autosave_association.rb
@@ -216,13 +216,7 @@ module ActiveRecord
method = :validate_single_association
end
- define_non_cyclic_method(validation_method) do
- send(method, reflection)
- # TODO: remove the following line as soon as the return value of
- # callbacks is ignored, that is, returning `false` does not
- # display a deprecation warning or halts the callback chain.
- true
- end
+ define_non_cyclic_method(validation_method) { send(method, reflection) }
validate validation_method
after_validation :_ensure_no_duplicate_errors
end
@@ -369,7 +363,6 @@ module ActiveRecord
# association whether or not the parent was a new record before saving.
def before_save_collection_association
@new_record_before_save = new_record?
- true
end
def after_save_collection_association