diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-07-30 17:15:32 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-07-30 17:54:02 -0500 |
commit | ded3d97c5ad7e48efc7f4a25d99c1d5773c13af4 (patch) | |
tree | d2d5a9df4564c36130a0fbc5dbc0b4d432b3c78e /activerecord | |
parent | 1ae7eb52006229f6d6975837f0ac1410e366d456 (diff) | |
download | rails-ded3d97c5ad7e48efc7f4a25d99c1d5773c13af4.tar.gz rails-ded3d97c5ad7e48efc7f4a25d99c1d5773c13af4.tar.bz2 rails-ded3d97c5ad7e48efc7f4a25d99c1d5773c13af4.zip |
Make sure we use send for the default attribute method body because the suffix maybe an invalid method name
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |