Fix failing test.

This commit is contained in:
José Valim 2010-04-28 23:42:55 +02:00
parent 3afa4847d9
commit 209ab7e05b
2 changed files with 1 additions and 1 deletions

View File

@ -932,7 +932,7 @@ module ActiveRecord #:nodoc:
end
def attribute_method?(attribute)
super || column_names.include?(attribute.to_s.sub(/=$/, ''))
super || (table_exists? && column_names.include?(attribute.to_s.sub(/=$/, '')))
end
# Set the lookup ancestors for ActiveModel.