diff options
author | Xavier Noria <fxn@hashref.com> | 2013-04-25 19:31:07 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-04-25 19:31:07 +0200 |
commit | 288b56f550fb239352537b93f737cfd4b68ddb0f (patch) | |
tree | 130c9ce28c9ccfc39be501b957b3e67404e0359b /activerecord/lib | |
parent | faa2c71deef44ded8ef73513e63229d057552540 (diff) | |
download | rails-288b56f550fb239352537b93f737cfd4b68ddb0f.tar.gz rails-288b56f550fb239352537b93f737cfd4b68ddb0f.tar.bz2 rails-288b56f550fb239352537b93f737cfd4b68ddb0f.zip |
fixes warning in the AR test suite
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index 7f59d0b4c6..818bb1a8a6 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -172,7 +172,7 @@ module ActiveRecord # If the result is true then check for the select case. # For queries selecting a subset of columns, return false for unselected columns. - if @attributes.present? && self.class.column_names.include?(name) + if defined?(@attributes) && @attributes.present? && self.class.column_names.include?(name) return has_attribute?(name) end |