Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed test for 3-1-stable. Abstract class is having nil class name. #2831

Merged
merged 1 commit into from

2 participants

@arunagw
Collaborator

We need to check here for the table name.
Abstract classes are having nil class name.
So nil.gsub will give a error here.

1) Error:
test_include_polymorphic_has_one_defined_in_abstract_parent(AssociationsJoinModelTest):
NoMethodError: undefined method `gsub' for nil:NilClass
@arunagw arunagw We need to check here for the table name.
Abstract classes are having nil class name.
So nil.gsub will give a error here.
891d0d7
@tenderlove tenderlove merged commit e835aa0 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 3, 2011
  1. @arunagw

    We need to check here for the table name.

    arunagw authored
    Abstract classes are having nil class name.
    So nil.gsub will give a error here.
This page is out of date. Refresh to see the latest.
View
1  activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -672,6 +672,7 @@ def tables(name = nil)
def table_exists?(name)
schema, table = extract_schema_and_table(name.to_s)
+ return false unless table # Abstract classes is having nil table name
binds = [[nil, table.gsub(/(^"|"$)/,'')]]
binds << [nil, schema] if schema
Something went wrong with that request. Please try again.