From 74757e741fd8f90a146b2b6215ed23f435e3a021 Mon Sep 17 00:00:00 2001 From: Alexander Dymo Date: Fri, 12 Jun 2009 12:43:11 +0300 Subject: [PATCH] Fix a typo when autosave/validate methods for associations were added as string callbacks and called through eval (with binding) instead of being added as symbols and called as methods. This as usual saves memory. --- .../lib/active_record/autosave_association.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb index 9717ca3..e9d167a 100644 --- a/activerecord/lib/active_record/autosave_association.rb +++ b/activerecord/lib/active_record/autosave_association.rb @@ -157,8 +157,8 @@ module ActiveRecord # Adds a validate and save callback for the association as specified by # the +reflection+. def add_autosave_association_callbacks(reflection) - save_method = "autosave_associated_records_for_#{reflection.name}" - validation_method = "validate_associated_records_for_#{reflection.name}" + save_method = "autosave_associated_records_for_#{reflection.name}".to_sym + validation_method = "validate_associated_records_for_#{reflection.name}".to_sym validate validation_method case reflection.macro -- 1.6.0.2