aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record')
-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.