aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/identity_map.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/identity_map.rb')
-rw-r--r--activerecord/lib/active_record/identity_map.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/identity_map.rb b/activerecord/lib/active_record/identity_map.rb
index f3891b406e..b1da547142 100644
--- a/activerecord/lib/active_record/identity_map.rb
+++ b/activerecord/lib/active_record/identity_map.rb
@@ -90,7 +90,7 @@ module ActiveRecord
end
def add(record)
- repository[record.class.symbolized_sti_name][record.id] = record if contain_all_columns(record)
+ repository[record.class.symbolized_sti_name][record.id] = record if contain_all_columns?(record)
end
def remove(record)
@@ -107,8 +107,8 @@ module ActiveRecord
private
- def contain_all_columns(record)
- (record.class.column_names - record.attribute_names) == []
+ def contain_all_columns?(record)
+ (record.class.column_names - record.attribute_names).empty?
end
end