From 9e4c41c903e8e58721f2c41776a8c60ddba7a0a9 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 26 Oct 2012 15:51:02 +0100 Subject: Remove ActiveRecord::Model In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced. --- activerecord/lib/active_record/attribute_methods.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/attribute_methods.rb') diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index 008696f6de..9a4fcdfda3 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -59,7 +59,7 @@ module ActiveRecord raise DangerousAttributeError, "#{method_name} is defined by ActiveRecord" end - if [Base, Model].include?(active_record_super) + if superclass == Base super else # If B < A and A defines its own attribute method, then we don't want to overwrite that. -- cgit v1.2.3