From 0584e21ac03a7abba100a8820aeab8de32facc2d Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 14 May 2017 02:43:02 +0900 Subject: [PATCH] Remove returning true in internal callbacks `display_deprecation_warning_for_false_terminator` was removed since 3a25cdc. --- activerecord/lib/active_record/attribute_methods.rb | 1 - activerecord/lib/active_record/autosave_association.rb | 9 +-------- activesupport/lib/active_support/i18n_railtie.rb | 4 ---- 3 files changed, 1 insertion(+), 13 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 @@ def define_attribute_methods # :nodoc: 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 607c54e481..f2391ba715 100644 --- a/activerecord/lib/active_record/autosave_association.rb +++ b/activerecord/lib/active_record/autosave_association.rb @@ -216,13 +216,7 @@ def define_autosave_validation_callbacks(reflection) 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 @@ def normalize_reflection_attribute(indexed_attribute, reflection, index, attribu # 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 diff --git a/activesupport/lib/active_support/i18n_railtie.rb b/activesupport/lib/active_support/i18n_railtie.rb index f05c707ccd..51fe6f3418 100644 --- a/activesupport/lib/active_support/i18n_railtie.rb +++ b/activesupport/lib/active_support/i18n_railtie.rb @@ -66,10 +66,6 @@ def self.initialize_i18n(app) app.reloaders << reloader app.reloader.to_run do reloader.execute_if_updated { require_unload_lock! } - # 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 reloader.execute -- GitLab