diff options
author | José Valim <jose.valim@gmail.com> | 2010-04-28 23:42:55 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-28 23:42:55 +0200 |
commit | 209ab7e05b148b02a2f9598a809eb10588c92259 (patch) | |
tree | 7939a51f3d23e7c0903ac45a395e35545d640f9c /activerecord | |
parent | 3afa4847d9598f52d960b2b8cc8c94cc101bb1e3 (diff) | |
download | rails-209ab7e05b148b02a2f9598a809eb10588c92259.tar.gz rails-209ab7e05b148b02a2f9598a809eb10588c92259.tar.bz2 rails-209ab7e05b148b02a2f9598a809eb10588c92259.zip |
Fix failing test.
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
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. |