From ded3d97c5ad7e48efc7f4a25d99c1d5773c13af4 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Thu, 30 Jul 2009 17:15:32 -0500 Subject: Make sure we use send for the default attribute method body because the suffix maybe an invalid method name --- activerecord/lib/active_record/attribute_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index 90a6a21981..0d444f0239 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -66,7 +66,7 @@ module ActiveRecord if respond_to?(generate_method) send(generate_method, name) else - evaluate_attribute_method("def #{method_name}(*args); attribute#{suffix}('#{name}', *args); end", method_name) + evaluate_attribute_method("def #{method_name}(*args); send(:attribute#{suffix}, '#{name}', *args); end", method_name) end end end -- cgit v1.2.3