aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-04-28 23:42:55 +0200
committerJosé Valim <jose.valim@gmail.com>2010-04-28 23:42:55 +0200
commit209ab7e05b148b02a2f9598a809eb10588c92259 (patch)
tree7939a51f3d23e7c0903ac45a395e35545d640f9c /activerecord
parent3afa4847d9598f52d960b2b8cc8c94cc101bb1e3 (diff)
downloadrails-209ab7e05b148b02a2f9598a809eb10588c92259.tar.gz
rails-209ab7e05b148b02a2f9598a809eb10588c92259.tar.bz2
rails-209ab7e05b148b02a2f9598a809eb10588c92259.zip
Fix failing test.
Diffstat (limited to 'activerecord')
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 8542c52d0c..9ed53cc4af 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -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.