diff options
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. |