Skip to content

Commit

Permalink
Make sure we use send for the default attribute method body because t…
Browse files Browse the repository at this point in the history
…he suffix maybe an invalid method name
  • Loading branch information
josh committed Jul 30, 2009
1 parent 1ae7eb5 commit ded3d97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/attribute_methods.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def define_attribute_methods
if respond_to?(generate_method) if respond_to?(generate_method)
send(generate_method, name) send(generate_method, name)
else 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 end
end end
Expand Down

0 comments on commit ded3d97

Please sign in to comment.