Permalink
Browse files

Make sure we use send for the default attribute method body because t…

…he suffix maybe an invalid method name
  • Loading branch information...
1 parent 1ae7eb5 commit ded3d97c5ad7e48efc7f4a25d99c1d5773c13af4 @josh josh committed Jul 30, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/attribute_methods.rb
@@ -66,7 +66,7 @@ def define_attribute_methods
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

0 comments on commit ded3d97

Please sign in to comment.