Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit ded3d97c5ad7e48efc7f4a25d99c1d5773c13af4 1 parent 1ae7eb5
@josh josh authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/attribute_methods.rb
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.