aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-07-31 18:08:56 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-07-31 18:08:56 -0700
commit6da63410cb69fa534e16f5a43aef77e73ddab4b2 (patch)
treee907ee7a89f7b096882ac9c81c229bf1e440292f /activerecord
parent946ac5eb4326f6a9eeee4322cf66c7cec465c670 (diff)
downloadrails-6da63410cb69fa534e16f5a43aef77e73ddab4b2.tar.gz
rails-6da63410cb69fa534e16f5a43aef77e73ddab4b2.tar.bz2
rails-6da63410cb69fa534e16f5a43aef77e73ddab4b2.zip
callback should always have a value
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations/collection_association.rb2
1 files changed, 1 insertions, 1 deletions
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