From 82ae5c40ea29eecc2c0d017ffc7c2f2a23a7e21f Mon Sep 17 00:00:00 2001 From: Edgars Beigarts Date: Sun, 4 Dec 2011 18:05:54 +0200 Subject: Fix sequence name with abstract classes. --- activerecord/lib/active_record/base.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/base.rb') diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 9bc0023539..e326153c20 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -721,10 +721,10 @@ module ActiveRecord #:nodoc: end def sequence_name - if superclass == Base + if base_class == self @sequence_name ||= reset_sequence_name else - (@sequence_name ||= nil) || superclass.sequence_name + (@sequence_name ||= nil) || base_class.sequence_name end end -- cgit v1.2.3