Skip to content
Browse files

No need to check for generated method, just redispatch

  • Loading branch information...
1 parent 6ebb061 commit 364a8f390216c4c5695ded89dacab0978fa6ae34 @jeremy jeremy committed Nov 14, 2009
Showing with 3 additions and 4 deletions.
  1. +3 −4 activerecord/lib/active_record/attribute_methods.rb
View
7 activerecord/lib/active_record/attribute_methods.rb
@@ -31,11 +31,10 @@ def method_missing(method_id, *args, &block)
self.class.define_attribute_methods
method_name = method_id.to_s
guard_private_attribute_method!(method_name, args)
- if self.class.generated_attribute_methods.instance_methods.include?(method_name)
- return self.send(method_id, *args, &block)
- end
+ send(method_id, *args, &block)
+ else
+ super
end
- super
end
def respond_to?(*args)

0 comments on commit 364a8f3

Please sign in to comment.
Something went wrong with that request. Please try again.