diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-11-14 01:51:52 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-11-14 01:51:52 -0800 |
commit | 364a8f390216c4c5695ded89dacab0978fa6ae34 (patch) | |
tree | 70241d230a79d0e2d62c5fa9bee4a5ef33c06f3d /activerecord | |
parent | 6ebb061b18cd5af087453879b3eac0f719ea4ec4 (diff) | |
download | rails-364a8f390216c4c5695ded89dacab0978fa6ae34.tar.gz rails-364a8f390216c4c5695ded89dacab0978fa6ae34.tar.bz2 rails-364a8f390216c4c5695ded89dacab0978fa6ae34.zip |
No need to check for generated method, just redispatch
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index ab7ad34b9e..3a9a67e3a2 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -31,11 +31,10 @@ module ActiveRecord 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) |