aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
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
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')
-rw-r--r--activerecord/lib/active_record/attribute_methods.rb1
-rw-r--r--activerecord/lib/active_record/autosave_association.rb9
2 files changed, 1 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb
index ebe06566cc..83c61fad19 100644
--- a/activerecord/lib/active_record/attribute_methods.rb
+++ b/activerecord/lib/active_record/attribute_methods.rb
@@ -62,7 +62,6 @@ module ActiveRecord
super(attribute_names)
@attribute_methods_generated = true
end
- true
end
def undefine_attribute_methods # :nodoc:
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