diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-05-14 02:43:02 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-05-14 03:42:17 +0900 |
commit | 0584e21ac03a7abba100a8820aeab8de32facc2d (patch) | |
tree | 63d8709120a6794384d9e1edfa92d41f1b222997 /activerecord | |
parent | 23aa0a2bb551717f153ac75f24c017c43ab853f2 (diff) | |
download | rails-0584e21ac03a7abba100a8820aeab8de32facc2d.tar.gz rails-0584e21ac03a7abba100a8820aeab8de32facc2d.tar.bz2 rails-0584e21ac03a7abba100a8820aeab8de32facc2d.zip |
Remove returning true in internal callbacks
`display_deprecation_warning_for_false_terminator` was removed since
3a25cdc.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 1 | ||||
-rw-r--r-- | activerecord/lib/active_record/autosave_association.rb | 9 |
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 607c54e481..f2391ba715 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 |