From 6da63410cb69fa534e16f5a43aef77e73ddab4b2 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 31 Jul 2013 18:08:56 -0700 Subject: callback should always have a value --- activerecord/lib/active_record/associations/collection_association.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index f7c49ec057..a1e93e20b5 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -523,7 +523,7 @@ module ActiveRecord def callbacks_for(callback_name) full_callback_name = "#{callback_name}_for_#{reflection.name}" - owner.class.send(full_callback_name) || [] + owner.class.send(full_callback_name) end # Should we deal with assoc.first or assoc.last by issuing an independent query to -- cgit v1.2.3