diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-12-04 15:19:17 -0800 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-12-04 15:19:17 -0800 |
commit | 4ded0dd2de4dca40fcb7ccbc215db4c098a6629d (patch) | |
tree | c108a72e7ae9e85a35a73981b71c25b1490b3f03 /activerecord/lib | |
parent | 4e74bd194beb6f51ee7c4bf06bfaab72d70f1c2c (diff) | |
parent | 82ae5c40ea29eecc2c0d017ffc7c2f2a23a7e21f (diff) | |
download | rails-4ded0dd2de4dca40fcb7ccbc215db4c098a6629d.tar.gz rails-4ded0dd2de4dca40fcb7ccbc215db4c098a6629d.tar.bz2 rails-4ded0dd2de4dca40fcb7ccbc215db4c098a6629d.zip |
Merge pull request #3851 from ebeigarts/fix_sequence_name
Fix sequence name with abstract classes.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/base.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 7efdcc8cb9..7ba585b8e0 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -722,10 +722,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 |