Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

do not compute table names for abstract classes

  • Loading branch information...
commit 0a0da9d554490f01fe57d69fe8d98f29b02be3e5 1 parent eb0b714
@amatsuda amatsuda authored
View
2  activerecord/lib/active_record/base.rb
@@ -624,6 +624,8 @@ def quoted_table_name
# Computes the table name, (re)sets it internally, and returns it.
def reset_table_name #:nodoc:
+ return if abstract_class?
+
self.table_name = compute_table_name
end
View
4 activerecord/test/cases/base_test.rb
@@ -1625,6 +1625,10 @@ def test_abstract_class
assert !LooseDescendant.abstract_class?
end
+ def test_abstract_class_table_name
+ assert_nil AbstractCompany.table_name
+ end
+
def test_base_class
assert_equal LoosePerson, LoosePerson.base_class
assert_equal LooseDescendant, LooseDescendant.base_class
Please sign in to comment.
Something went wrong with that request. Please try again.