aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_set.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/attribute_set.rb')
-rw-r--r--activerecord/lib/active_record/attribute_set.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/attribute_set.rb b/activerecord/lib/active_record/attribute_set.rb
index 66fcaf6945..fdce68ce45 100644
--- a/activerecord/lib/active_record/attribute_set.rb
+++ b/activerecord/lib/active_record/attribute_set.rb
@@ -64,6 +64,10 @@ module ActiveRecord
end
end
+ def accessed
+ attributes.select { |_, attr| attr.has_been_read? }.keys
+ end
+
protected
attr_reader :attributes